https://github.com/cloudstek/nodejs-cache
Simple key/value (cache) store.
https://github.com/cloudstek/nodejs-cache
cache key-value nodejs
Last synced: 13 days ago
JSON representation
Simple key/value (cache) store.
- Host: GitHub
- URL: https://github.com/cloudstek/nodejs-cache
- Owner: Cloudstek
- License: mit
- Created: 2019-05-21T23:37:09.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T01:51:30.000Z (over 2 years ago)
- Last Synced: 2025-02-15T15:19:30.638Z (2 months ago)
- Topics: cache, key-value, nodejs
- Language: TypeScript
- Size: 968 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @cloudstek/cache
> Simple key/value (cache) store.[](https://circleci.com/gh/Cloudstek/nodejs-cache) [](https://coveralls.io/github/Cloudstek/nodejs-cache?branch=master)
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.
### Features
* 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.## Requirements
* NodeJS >= 10
* NPM / Yarn## Installation
Using yarn (preferred):
```sh
yarn add @cloudstek/cache
```Using NPM:
```sh
npm install @cloudstek/cache
```## Development
Clone this repository to get started. You can replace `yarn` in the commands below with `npm` if you use NPM.
### Build code and watch for changes
During development you can build the code once and have typescript watch for changes and recompile automatically.
```sh
yarn run watch
```### Checking code for style
To check the code for style correctness run:
```sh
yarn run lint
```### Running tests
Tests are run using [Ava](https://github.com/avajs/ava) and coverage is generated using [Istanbul](https://istanbul.js.org/). To run the tests run:
```sh
yarn run build
yarn run test
```### Building the code for release
To build the code for release (e.g. npm publish), run:
```sh
yarn run build:dist
```## Also check out
[sindresorhus/conf](https://github.com/sindresorhus/conf): Simple config handling for your app or module