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

sequelize-simple-cache

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sequelize-simple-cache - npm Package Compare versions

Comparing version 1.0.0-beta.8 to 1.0.0-beta.9

2

package.json
{
"name": "sequelize-simple-cache",
"version": "1.0.0-beta.8",
"version": "1.0.0-beta.9",
"description": "A simple, transparent, client-side, in-memory cache for Sequelize",

@@ -5,0 +5,0 @@ "main": "src/SequelizeSimpleCache.js",

@@ -16,4 +16,8 @@ const md5 = require('md5');

}), {});
const { debug = false } = options;
const {
debug = false, // eslint-disable-next-line no-console
delegate = (event, details) => console.debug(`CACHE ${event.toUpperCase()}`, details),
} = options;
this.debug = debug;
this.delegate = delegate;
this.cache = new Map();

@@ -105,6 +109,6 @@ this.stats = { hit: 0, miss: 0, load: 0 };

log(tag, details) {
log(event, details) {
// stats
if (['hit', 'miss', 'load'].includes(tag)) {
this.stats[tag] += 1;
if (['hit', 'miss', 'load'].includes(event)) {
this.stats[event] += 1;
}

@@ -123,3 +127,3 @@ // debug logging

out.size = this.cache.size;
console.debug(`>>> CACHE ${tag.toUpperCase()} >>>`, out); // eslint-disable-line no-console
this.delegate(event, out);
}

@@ -126,0 +130,0 @@ }

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