// src/main/redis/string.ts // String 操作 import { getClient } from './connection' export async function getStringValue(id: string, key: string): Promise { const client = getClient(id) if (!client) throw new Error(`Client ${id} not found`) return client.get(key) } export async function setStringValue(id: string, key: string, value: string): Promise { const client = getClient(id) if (!client) throw new Error(`Client ${id} not found`) await client.set(key, value) }