Download packages/cache/src/user-cache.ts from AUXteam/Midday: direct link, hf CLI and curl.
- Browser
- Download file 409 Bytes
-
https://huggingface.co/spaces/AUXteam/Midday/resolve/main/packages/cache/src/user-cache.ts
- Command line
-
hf download hf://spaces/AUXteam/Midday/packages/cache/src/user-cache.ts
-
curl -L -o user-cache.ts https://huggingface.co/spaces/AUXteam/Midday/resolve/main/packages/cache/src/user-cache.ts
409 Bytes
| import { RedisCache } from "./redis-client"; | |
| // Redis-based cache for users shared across all server instances | |
| const cache = new RedisCache("user", 30 * 60); // 30 minutes TTL | |
| export const userCache = { | |
| get: (key: string): Promise<any | undefined> => cache.get(key), | |
| set: (key: string, value: any): Promise<void> => cache.set(key, value), | |
| delete: (key: string): Promise<void> => cache.delete(key), | |
| }; | |