Skip to content

Simple in-memory store for node-cache-manager. Mainly used for unit testing purposes.

License

Notifications You must be signed in to change notification settings

theogravity/node-cache-manager-memory-store

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-cache-manager-memory-store

Note: node-cache-manager already has a built-in memory store as a default when no stores are used.

Simple in-memory store for node-cache-manager. Mainly used for unit testing purposes.

Does not do anything special other than maintain an in-memory object, getting and setting values to it.

TTL is not supported. Tests contain TTL but it's to only make sure the cache manager interface is implemented correctly.

Install

npm i cache-manager-memory-store --save

Using this store

import MemoryStore from 'cache-manager-memory-store'
import cacheManager from 'cache-manager'

let memoryCache = cacheManager.caching({
    store: MemoryStore
})

Run tests with:

npm run test

About

Simple in-memory store for node-cache-manager. Mainly used for unit testing purposes.

Resources

License

Stars

Watchers

Forks

Packages

No packages published