zyf-server
Version:
A modern HTTP static file server with Vue SSR directory listing, built for developers
24 lines • 625 B
TypeScript
/**
* 缓存管理器
* 处理HTTP缓存策略
*/
import { type IncomingMessage, type ServerResponse } from 'http';
import { type Stats } from 'fs';
import type { CacheConfig } from '../types';
export declare class CacheManager {
private readonly config;
constructor(config?: CacheConfig);
/**
* 检查资源是否未修改
*/
isNotModified(req: IncomingMessage, stats: Stats): boolean;
/**
* 设置缓存相关头部
*/
setHeaders(res: ServerResponse, stats: Stats): void;
/**
* 生成ETag
*/
private generateETag;
}
//# sourceMappingURL=CacheManager.d.ts.map