@herbertgao/surgio
Version:
Generating rules for Surge, Clash, Quantumult like a PRO
24 lines (23 loc) • 794 B
TypeScript
import { MemoryCache, MemoryStore } from 'cache-manager';
import { RedisCache, RedisStore } from 'cache-manager-ioredis-yet';
type CacheType = MemoryCache | RedisCache;
type StoreType = MemoryStore | RedisStore;
export declare class UnifiedCache {
#private;
prepare(): Promise<CacheType>;
getType(): Promise<"default" | "redis">;
getBackend(): Promise<CacheType>;
get: CacheType['get'];
set: CacheType['set'];
del: CacheType['del'];
reset: CacheType['reset'];
wrap: CacheType['wrap'];
keys: StoreType['keys'];
mset: StoreType['mset'];
mget: StoreType['mget'];
mdel: StoreType['mdel'];
has(key: string): Promise<boolean>;
}
export declare const unifiedCache: UnifiedCache;
export declare const cleanCaches: () => Promise<void>;
export {};