brickcharts
Version:
A comprehensive library for managing Billboard and Last.FM charts with visualizations and data management
48 lines (47 loc) • 1.01 kB
TypeScript
import { ChartData, CacheOptions } from '../types';
export declare class ChartCache {
private memoryCache;
private options;
constructor(options?: CacheOptions);
/**
* Set cache item
*/
set(key: string, data: ChartData): Promise<void>;
/**
* Get cache item
*/
get(key: string): Promise<ChartData | null>;
/**
* Delete cache item
*/
delete(key: string): Promise<void>;
/**
* Clear cache by pattern
*/
clearByPattern(pattern: string): Promise<void>;
/**
* Clear all cache
*/
clear(): Promise<void>;
/**
* Get cache statistics
*/
getStats(): Promise<any>;
/**
* Check if cache item is expired
*/
private isExpired;
/**
* Evict oldest cache item
*/
private evictOldest;
/**
* Save to localStorage
*/
private saveToStorage;
/**
* Load from localStorage
*/
private loadFromStorage;
}
//# sourceMappingURL=ChartCache.d.ts.map