🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

bookshelf-cache-redis

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bookshelf-cache-redis - npm Package Compare versions

Comparing version

to
1.1.0

2

package.json
{
"name": "bookshelf-cache-redis",
"version": "1.0.2",
"version": "1.1.0",
"description": "A robust, performance-focused caching solution for Bookshelf based on top of Redis.",

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

@@ -72,6 +72,3 @@ /**

if (!serial || disabled === true) {
return await this.constructor.forge()[method](options)
.then(data => {
return data.toJSON();
});
return await this[method](options);
}

@@ -82,6 +79,4 @@

if (result === null) {
const cache = await this.constructor.forge()[method](options)
.then(data => {
return data.toJSON();
})
const cache = await this[method](options)
.then(data => data.toJSON());

@@ -91,6 +86,10 @@ // Store record

return cache;
return ({
toJSON: () => cache
});
}
return JSON.parse(result);
return ({
toJSON: () => JSON.parse(result)
});
});

@@ -150,13 +149,2 @@ }

};
bookshelf.Model.prototype.cache = function () {
console.log(this);
return this;
}
bookshelf.Model.cache = function (...args) {
console.log(this);
return this;
}
};