@udisc/hybrid-disk-cache
Version:
A hybrid disk cache utilize both the database and the file system.
22 lines (21 loc) • 508 B
TypeScript
import Cache, { CacheOptions } from './';
export declare class Adapter {
cache: Cache;
private interval?;
/**
* Init the hybrid-disk-cache adapter
*
* @param conf the cache's config, with defaults:
* - ttl=3600
* - tbd=3600
* - path=$TMPDIR/hdc
* @returns the hdc cache instance
*/
constructor(conf?: CacheOptions);
init(): Promise<Cache>;
/**
* Stop the purge timer
*/
shutdown(): Promise<void>;
private initPurgeTimer;
}