catbox-memory

Memory adapter for catbox

This module has moved and is now available at @hapi/catbox-memory. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
Last updated 2 years ago by hueniverse .
BSD-3-Clause · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install catbox-memory 
SYNC missed versions from official npm registry.

catbox-memory

Memory 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.

Lead Maintainer - Wyatt Preul

Current version: Current Version Build Status

Options

  • maxByteSize - sets an upper limit on the number of bytes that can be stored in the cache. Once this limit is reached no additional items will be added to the cache until some expire. The utilized memory calculation is a rough approximation and must not be relied on. Defaults to 104857600 (100MB).
  • minCleanupIntervalMsec - the minimum number of milliseconds in between each cache cleanup. Defaults to 1 second (1000).
  • allowMixedContent - by default, all data is cached as JSON strings, and converted to an object using JSON.parse() on retrieval. By setting this option to true, Buffer data can be stored alongside the stringified data. Buffers are not stringified, and are copied before storage to prevent the value from changing while in the cache. Defaults to false.
  • cloneBuffersOnGet - by default, buffers stored in the cache with allowMixedContent set to true are copied when they are set but not when they are retrieved. This means a change to the buffer returned by a get() will change the value in the cache. To prevent this, set cloneBuffersOnGet to true to always return a copy of the cached buffer. Defaults to false.

Current Tags

  • 4.0.1                                ...           latest (2 years ago)
  • 3.1.4                                ...           lts (2 years ago)

22 Versions

  • 3.1.4 [deprecated]           ...           2 years ago
  • 4.0.1 [deprecated]           ...           2 years ago
  • 3.1.3 [deprecated]           ...           2 years ago
  • 4.0.0 [deprecated]           ...           2 years ago
  • 3.1.2 [deprecated]           ...           2 years ago
  • 3.1.1 [deprecated]           ...           3 years ago
  • 3.1.0 [deprecated]           ...           3 years ago
  • 3.0.0 [deprecated]           ...           3 years ago
  • 2.0.4 [deprecated]           ...           4 years ago
  • 2.0.3 [deprecated]           ...           4 years ago
  • 2.0.2 [deprecated]           ...           4 years ago
  • 2.0.1 [deprecated]           ...           5 years ago
  • 2.0.0 [deprecated]           ...           5 years ago
  • 1.1.2 [deprecated]           ...           5 years ago
  • 1.1.1 [deprecated]           ...           6 years ago
  • 1.1.0 [deprecated]           ...           6 years ago
  • 1.0.5 [deprecated]           ...           6 years ago
  • 1.0.4 [deprecated]           ...           6 years ago
  • 1.0.3 [deprecated]           ...           6 years ago
  • 1.0.2 [deprecated]           ...           6 years ago
  • 1.0.1 [deprecated]           ...           6 years ago
  • 1.0.0 [deprecated]           ...           6 years ago

Copyright 2014 - 2016 © taobao.org |