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

cachalot

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cachalot - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

4

CHANGELOG.md
# Changelog
#### [1.1.1]
- run executor after storage throws an error
- change default operation timeout to 150
#### [1.1.0]

@@ -4,0 +8,0 @@ - support for dynamic tags in Manager's default storage via "getTags" option.

2

dist/adapters/redis/index.d.ts

@@ -7,3 +7,3 @@ import { ConnectionStatus } from '../../connection-status';

export declare const CACHE_PREFIX = "cache";
export declare const DEFAULT_OPERATION_TIMEOUT = 200;
export declare const DEFAULT_OPERATION_TIMEOUT = 150;
export declare const DEFAULT_LOCK_EXPIRES = 20000;

@@ -10,0 +10,0 @@ export declare type CommandArgument = string | number;

@@ -9,3 +9,3 @@ "use strict";

exports.CACHE_PREFIX = 'cache';
exports.DEFAULT_OPERATION_TIMEOUT = 200;
exports.DEFAULT_OPERATION_TIMEOUT = 150;
exports.DEFAULT_LOCK_EXPIRES = 20000;

@@ -12,0 +12,0 @@ /**

@@ -21,3 +21,10 @@ "use strict";

const executorContext = { key, executor, options };
const record = await this.storage.get(key);
let record = null;
try {
record = await this.storage.get(key);
}
catch (e) {
this.logger.error('Failed to get value from storage, falling back to executor', e);
return executor();
}
if (await this.isRecordValid(record)) {

@@ -24,0 +31,0 @@ this.logger.trace('hit', key);

@@ -31,3 +31,10 @@ "use strict";

const executorContext = { key, executor, options };
const record = await this.storage.get(key);
let record = null;
try {
record = await this.storage.get(key);
}
catch (e) {
this.logger.error('Failed to get value from storage, falling back to executor', e);
return executor();
}
if (await this.isRecordValid(record)) {

@@ -34,0 +41,0 @@ const result = deserialize_1.default(record.value);

@@ -20,3 +20,10 @@ "use strict";

async get(key, executor, options = {}) {
const record = await this.storage.get(key);
let record = null;
try {
record = await this.storage.get(key);
}
catch (e) {
this.logger.error('Failed to get value from storage, falling back to executor', e);
return executor();
}
const executorContext = { key, executor, options };

@@ -23,0 +30,0 @@ if (await this.isRecordValid(record)) {

{
"name": "cachalot",
"version": "1.1.0",
"version": "1.1.1",
"description": "Cache manager for nodejs with support different cache strategies",

@@ -41,15 +41,15 @@ "keywords": [

"devDependencies": {
"@types/ioredis": "^4.0.10",
"@types/jest": "^24.0.13",
"@types/lodash": "^4.14.132",
"@types/ioredis": "^4.0.12",
"@types/jest": "^24.0.15",
"@types/lodash": "^4.14.135",
"@types/node": "^8",
"coveralls": "^3.0.3",
"ioredis": "^4.9.5",
"coveralls": "^3.0.4",
"ioredis": "^4.11.1",
"jest": "^24.8.0",
"ts-jest": "^24.0.2",
"tslint": "^5.16.0",
"tslint": "^5.18.0",
"tslint-config-unional": "^0.10.0",
"typedoc": "^0.14.2",
"typescript": "^3.4.5"
"typescript": "^3.5.2"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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