import type { ApiKey } from "@midday/db/queries"; import { RedisCache } from "./redis-client"; // Redis-based cache for API keys shared across all server instances const cache = new RedisCache("api-key", 30 * 60); // 30 minutes TTL export const apiKeyCache = { get: (key: string): Promise => cache.get(key), set: (key: string, value: ApiKey): Promise => cache.set(key, value), delete: (key: string): Promise => cache.delete(key), };