Simple key/value (cache) store.
It doesn't do anything fancy and it doesn't have a fancy name. Yet I needed a simple key/value store with optional support for expiration of items.
- Optional expiration of items (without expiration it works as a simple k/v store)
- Per-item configurable TTL.
- Iterable storage
- Written in typescript
- Support writing to JSON or in-memory.
- NodeJS >= 10
- NPM / Yarn
Using yarn (preferred):
yarn add @cloudstek/cacheUsing NPM:
npm install @cloudstek/cacheClone this repository to get started. You can replace yarn in the commands below with npm if you use NPM.
During development you can build the code once and have typescript watch for changes and recompile automatically.
yarn run watchTo check the code for style correctness run:
yarn run lintTests are run using Ava and coverage is generated using Istanbul. To run the tests run:
yarn run build
yarn run testTo build the code for release (e.g. npm publish), run:
yarn run build:distsindresorhus/conf: Simple config handling for your app or module