1.0.0 • Published 5 years ago

@serayaeryn/memory-cache v1.0.0

Weekly downloads
2
License
MIT
Repository
-
Last release
5 years ago

memory-cache

Build Status Coverage Status NPM version JavaScript Style Guide

Installation

npm i @serayaeryn/memory-cache

API

Cache(options)

ttl

Time to live in milliseconds.

Cache#get(key)

Returns the cached entry for the key.

Cache#has(key)

Allows to check if the cache contains an entry for the key.

Cache#remove(key)

Remove the entry for the key from the cache.

Cache#put(key, value)

Stores the value for the key in the cache.

License

Licensed under MIT.