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

cache-service-node-cache

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cache-service-node-cache - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

14

nodeCacheModule.js

@@ -18,3 +18,3 @@ var nodeCache = require('node-cache');

self.verbose = config.verbose || false;
self.expiration = config.defaultExpiration || 900;
self.defaultExpiration = config.defaultExpiration || 900;
self.readOnly = (typeof config.readOnly === 'boolean') ? config.readOnly : false;

@@ -36,3 +36,3 @@ self.checkOnPreviousEmpty = (typeof config.checkOnPreviousEmpty === 'boolean') ? config.checkOnPreviousEmpty : true;

try {
cacheKey = (cleanKey) ? cleanKey : key;
var cacheKey = (cleanKey) ? cleanKey : key;
log(false, 'Attempting to get key:', {key: cacheKey});

@@ -71,3 +71,3 @@ self.db.get(cacheKey, function(err, result){

if(!self.readOnly){
expiration = expiration || self.expiration;
expiration = expiration || self.defaultExpiration;
cb = cb || noop;

@@ -91,3 +91,3 @@ self.db.set(key, value, expiration, cb);

if(obj.hasOwnProperty(key)){
var tempExpiration = expiration || self.expiration;
var tempExpiration = expiration || self.defaultExpiration;
var value = obj[key];

@@ -127,3 +127,3 @@ if(typeof value === 'object' && value.cacheValue){

self.flushAll = function(cb){
log(false, 'Attempting to flush all data:');
log(false, 'Attempting to flush all data.');
try {

@@ -153,3 +153,3 @@ self.db.flushAll();

}
self.type = config.type || 'node-cache-standalone';
self.type = config.type || 'node-cache';
}

@@ -164,3 +164,3 @@

function log(isError, message, data){
var indentifier = 'cacheService: ';
var indentifier = 'nodeCacheModule: ';
if(self.verbose || isError){

@@ -167,0 +167,0 @@ if(data) console.log(indentifier + message, data);

{
"name": "cache-service-node-cache",
"version": "0.1.0",
"version": "0.1.1",
"description": "A node-cache plugin for cache-service.",

@@ -5,0 +5,0 @@ "main": "nodeCacheModule.js",

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