///
import { StorageProvider } from '../storage/StorageProvider';
export interface MediaCacheOptions {
storage: StorageProvider;
cacheRoot: string;
}
export interface CacheEntry {
hit: true;
buffer: Buffer;
contentType: string;
}
export interface CacheMiss {
hit: false;
}
export type CacheLookup = CacheEntry | CacheMiss;
export interface CacheStats {
images: {
count: number;
totalBytes: number;
};
audio: {
count: number;
totalBytes: number;
};
}
export declare function createMediaCache(options: MediaCacheOptions): {
get: (category: string, key: string) => Promise;
put: (category: string, key: string, data: Buffer, contentType: string, meta: Record) => Promise;
invalidate: (category: string, key: string) => Promise;
clearCategory: (category: string) => Promise;
clearAll: () => Promise;
stats: () => Promise;
evict: () => Promise;
};
export type MediaCache = ReturnType;
//# sourceMappingURL=mediaCache.d.ts.map