1.0.5 • Published 4 years ago
qache v1.0.5
Qache
What is Qache?
Qache is a utility class for handling server side caching of MongoDB queries made with GraphQL.
Installation
Using npm:
$ npm i qacheIn Node.js:
// Load the Qache class
var Qache = require('qache');
// Instantiate a cache
var cache = new Qache();Qache Properties
contentsizemaxSizeTTL
Qache Methods
get(key)set(key, value)listCreate(listKey, ...item)listRange(listKey, start, end)listPush(item, ...listKeys)listRemoveItem(filterObject, ...listKey)listUpdate(filterObject, newItem, ...listKey)listFetch(listKey,filterObject)invalidate(...keys)
Support
Tested in Node.js 16.13.0
Automated unit tests are available.
See the complete package source for more details, as well as a fullstack demo application.