A simple synchronous key-value cache for the browser that supports TTL-based expiration with aggressive deletion, localStorage persistence, and manual cache management. Version 3.0.0 is the latest stable release, last updated in 2017. Key differentiators: minimalistic API, synchronous operations, optional localStorage backing, and automatic expiration recycling. The package ships TypeScript types. Maintenance is low, with no recent updates.
npm install cachefactoryNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic setup: creating a cache with expiration, storing/retrieving an object, and cleanup.
Migrate to a maintained library like lru-cache.
Use import syntax or enable esModuleInterop in TypeScript and use default import.
Update imports to ES module syntax.
Use import syntax: import { CacheFactory } from 'cachefactory'; or enable ESM in your project.Run npm install cachefactory --save
Ensure you import { CacheFactory } from 'cachefactory' and instantiate: new CacheFactory()No dependency data recorded yet.