2020-07-19 11:57:47 +02:00
|
|
|
export default interface CacheProvider {
|
2020-10-01 13:58:50 +02:00
|
|
|
get<T extends string | undefined>(key: string, defaultValue?: T): Promise<T>;
|
2020-07-19 11:57:47 +02:00
|
|
|
|
|
|
|
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>;
|
2020-09-25 23:42:15 +02:00
|
|
|
}
|