mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-01 14:57:14 +08:00
c09dacac5b
* feat(api): add cache probing * fix(tests): correct query parameter from 'path' to 'requestPath' in status tests * feat(cache): add has to workers kv
19 lines
520 B
TypeScript
19 lines
520 B
TypeScript
import type Redis from 'ioredis';
|
|
import type { LRUCache } from 'lru-cache';
|
|
|
|
type CacheModule = {
|
|
init: () => void;
|
|
get: (key: string, refresh?: boolean) => Promise<string | null> | string | null;
|
|
has: (key: string) => Promise<boolean> | boolean;
|
|
set: (key: string, value?: string | Record<string, any>, maxAge?: number) => any;
|
|
status: {
|
|
available: boolean;
|
|
};
|
|
clients: {
|
|
redisClient?: Redis;
|
|
memoryCache?: LRUCache<any, any>;
|
|
};
|
|
};
|
|
|
|
export default CacheModule;
|