catbox-memory
Installation:

npm: npm install @hapi/catbox-memory

yarn: yarn add @hapi/catbox-memory

Introduction

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.

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).
  • cloneBuffersOnGet - by default, buffers stored in the cache 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.

Changelog

#69
Update deps
4.1.0
breaking changes
#66
Remove allowMixedContent option
#65
Change module namespace
#64
Typo _timeDue vs _timerDue
#61
Remove engines
4.0.0
breaking changes
#57
Update hoek v6
#55
Buffers can change while in cache
#8
Large overhead from expires times when highly populated
#67
Change module namespace v3
#60
Remove engines
#58
Update deps
#56
Remove new Buffer usage
#54
Fix new Boom
#53
Replace hash with Map
#52
Sync client for catbox 10
#48
Use big-time for long timeout support
3.0.0
breaking changes
#47
Node 8
#63
Commercial version of v2 branch
#43
Update deps
#42
fix: cancel timeouts on drop
#38
Add .npmignore
#37
add note to readme about the limitation of ttl
#33
Update hapijs/catbox to 7.0.0
#32
v1.1.2
#27
Clean up timers when the cache is stopped.
#26
Remove Makefile in favor of npm scripts and enable linting
#24
add node 0.11 to travis file
#23
version 1.1.1. update to catbox 4 and lab 5 (replace chai with code)
#22
Update to Lab 5
#21
Update to catbox 4
#17
Bump version to 1.1.0
#16
Release 1.1.0
#15
Add support for Buffers
#14
Add build status to README
#13
Add build status to readme
#12
Update owner
#5
Option to store buffer data
#11
Up version and use lab 4
#10
Fix total byteSize tracking in connection
#9
Create named classes for cache objects
#7
Memory limit does not restrict data size properly
#6
Rename spumko to hapijs
#4
Move large ttl (over 32bit) check from catbox
#2
Bring coverage back to 100%
#1
why peer depend instead of verify in parent
clipboard