Skip to content

@hapi/catbox-object v3.0.1

console
npm install @hapi/catbox-object@3.0.1
console
yarn add @hapi/catbox-object@3.0.1
console
pnpm add @hapi/catbox-object@3.0.1

Object cache adaptor for catbox.

Compatibility

Major versionLicenseNode.js
3BSD>= 16

Introduction

Memory object adapter for catbox. This adapter is not designed to share a common cache between multiple processes (e.g. in a cluster mode). It uses a single interval timeout to look for expired records and clean them from memory. Unlike the catbox-memory cache, it does not clone objects stored (in either direction) or keep track of memory usage.

new CatboxObject.Engine(options)

  • maxSize - sets an upper limit on the number of items that can be stored in the cache. Once this limit is reached no additional items will be added to the cache until some expire. Defaults to 1000.
  • minCleanupIntervalMsec - the minimum number of milliseconds in between each cache cleanup. Defaults to 1 second (1000).

Deploys by Netlify