14 lines
342 B
TypeScript
14 lines
342 B
TypeScript
|
export default interface CacheProvider {
|
||
|
get(key: string, defaultValue?: string): Promise<string | null>;
|
||
|
|
||
|
has(key: string): Promise<boolean>;
|
||
|
|
||
|
forget(key: string): Promise<void>;
|
||
|
|
||
|
/**
|
||
|
* @param key
|
||
|
* @param value
|
||
|
* @param ttl in ms
|
||
|
*/
|
||
|
remember(key: string, value: string, ttl: number): Promise<void>;
|
||
|
}
|