qache

1.0.5 • Public • Published

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 qache

In Node.js:

// Load the Qache class
var Qache = require('qache');

// Instantiate a cache
var cache = new Qache();

Qache Properties

  • content
  • size
  • maxSize
  • TTL

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.

Package Sidebar

Install

npm i qache

Weekly Downloads

2

Version

1.0.5

License

MIT

Unpacked Size

19.9 kB

Total Files

4

Last publish

Collaborators

  • leocrossman
  • qache
  • nader12334
  • ep1815
  • stebed