import { createToken } from '@tinkoff/dippy' ; description export const CREATE_CACHE_TOKEN = createToken < CacheFactory > ( 'createCache' ) ; description export const REGISTER_CLEAR_CACHE_TOKEN = createToken < ( type : string ) => void | Promise < void > > ( 'registerClearCache' , { multi : true } ) ; description export const CLEAR_CACHE_TOKEN = createToken < ( type ? : string ) => Promise < void > > ( 'clearCache' ) ; export interface Cache < T = any > { get ( key ) : T ; set ( key , value ) : void ; has ( key ) : boolean ; clear ( ) : void ; } export type CacheFactory = < T > ( type ? : string , ... args : unknown [ ] ) => Cache < T > ;