@ng-mfe/cache
v0.1.1
Published
Cache service with LRU and TTL
Readme
@ng-mfe/cache
支持 LRU 淘汰和 TTL 过期的缓存服务。
安装
npm install @ng-mfe/cache用法
import { CacheService } from '@ng-mfe/cache';
const cache = new CacheService({ maxSize: 100, ttl: 60000 });
cache.set('key', value);
const hit = cache.get('key');API 接口
- CacheService — 支持通知的 LRU/TTL 缓存
- CacheHttpMiddleware — HTTP 管道集成
- createCacheKey — 生成确定性缓存键
文档
查看主 README 获取完整文档。
