Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
cachegoose
Advanced tools
#cachegoose
####Mongoose caching that actually works.
##About
While looking for a Mongoose caching solution, I grew tired of packages that didn't work with the latest version of Mongoose, or that returned POJO's instead of Mongoose models. This inspired me to write cachegoose, A Mongoose caching module that works exactly how you would expect it to, with the latest version of Mongoose.
##Usage
var mongoose = require('mongoose');
var cachegoose = require('cachegoose');
cachegoose(mongoose, {
engine: 'redis', // If you don't specify the redis engine,
port: 6379, // the query results will be cached in memory.
host: 'localhost'
});
Record
.find({ some_condition: true })
.cache(30) // The number of seconds to cache the query in Redis. Defaults to 1 minute.
.exec(function(err, records) {
...
});
That's pretty much it. Just insert .cache()
into the queries you want to cache, and they will be cached. Works with select
, lean
, sort
, and anything else that will modify the results of a query.
##Test npm test
FAQs
Mongoose caching that actually works.
The npm package cachegoose receives a total of 401 weekly downloads. As such, cachegoose popularity was classified as not popular.
We found that cachegoose demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.