import { KeyType } from './key-type' ; import { Cache } from './cache' ; import { Metrics } from './metrics/metrics' ; /**
 * Abstract class for all cache implementations. This exists so that its
 * possible to use instanceof with caches like: `obj instanceof AbstractCache`.
 */ export abstract class AbstractCache < K extends KeyType , V > implements Cache < K , V > { public abstract maxSize : number ; public abstract size : number ; public abstract weightedSize : number ; public abstract set ( key , value ) ; public abstract getIfPresent ( key ) ; public abstract peek ( key ) ; public abstract has ( key ) ; public abstract delete ( key ) ; public abstract clear ( ) ; public abstract keys ( ) ; public abstract cleanUp ( ) ; public abstract metrics : Metrics ; }