express-cache-file
Version:
Express middleware to cache static files in server memory
10 lines (9 loc) • 352 B
TypeScript
import { Cache, GetFileFn } from './types';
import { UpdateInterval } from './interval';
export type UpdateOptions = {
expire?: UpdateInterval;
mode?: UpdateMode;
};
export type UpdateMode = 'cache_first' | 'wait';
declare function getCacheFile(getFile: GetFileFn, cache: Cache, options: UpdateOptions): GetFileFn;
export default getCacheFile;