@serayaeryn/memory-cache
v1.0.0
Published
simple memory cache
Downloads
4
Readme
memory-cache
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.