Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

catbox-memory

Package Overview
Dependencies
Maintainers
4
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

catbox-memory - npm Package Compare versions

Comparing version 2.0.4 to 2.1.1

LICENSE.md

9

lib/index.js
'use strict';
// Load modules
const Hoek = require('hoek');
// Declare internals
const internals = {};

@@ -18,6 +14,9 @@

// Provides a named reference for memory debugging
internals.MemoryCacheSegment = function MemoryCacheSegment() {
};
internals.MemoryCacheEntry = function MemoryCacheEntry(key, value, ttl, allowMixedContent) {

@@ -28,3 +27,3 @@

if (allowMixedContent && Buffer.isBuffer(value)) {
this.item = new Buffer(value.length);
this.item = Buffer.alloc(value.length);
// copy buffer to prevent value from changing while in the cache

@@ -31,0 +30,0 @@ value.copy(this.item);

{
"name": "catbox-memory",
"description": "Memory adapter for catbox",
"version": "2.0.4",
"version": "2.1.1",
"repository": "git://github.com/hapijs/catbox-memory",
"engines": {
"node": ">=6.0.0"
},
"main": "lib/index.js",

@@ -12,5 +15,2 @@ "keywords": [

],
"engines": {
"node": ">=4.0.0"
},
"dependencies": {

@@ -22,9 +22,9 @@ "hoek": "4.x.x"

"code": "4.x.x",
"lab": "11.x.x"
"lab": "14.x.x"
},
"scripts": {
"test": "lab -a code -v -L -t 100",
"test-cov-html": "lab -a code -r html -o coverage.html"
"test": "lab -a code -L -t 100 -l",
"test-cov-html": "lab -a code -r html -o coverage.html -l"
},
"license": "BSD-3-Clause"
"license": "SEE LICENSE IN LICENSE.md"
}

@@ -1,22 +0,9 @@

catbox-memory
=============
# catbox-memory
Memory adapter for [catbox](https://github.com/hapijs/catbox).
Lead Maintainer - [Wyatt Preul](https://github.com/geek)
[![Build Status](https://travis-ci.org/hapijs/catbox-memory.svg?branch=v2-commercial)](https://travis-ci.org/hapijs/catbox-memory)
Current version: [![Current Version](https://img.shields.io/npm/v/catbox-memory.svg)](https://www.npmjs.org/package/catbox-memory) [![Build Status](https://api.travis-ci.org/hapijs/catbox-memory.svg)](https://travis-ci.org/hapijs/catbox-memory)
## License
### 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).
- `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. `Buffer`s are not
stringified, and are copied before storage to prevent the value from changing while
in the cache. Defaults to `false`.
Note: the maximum allowed value for `ttl` is `2^31-1`, which is around 24.8 days.
This version of the package requires a commercial license. You may not use, copy, or distribute it without first acquiring a commercial license from Sideway Inc. Using this software without a license is a violation of US and international law. To obtain a license, please contact [sales@sideway.com](mailto:sales@sideway.com). The open source version of this package can be found [here](https://github.com/hapijs/catbox-memory).
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc