
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
mongoose-redis-caching
Advanced tools
A simple caching solution for Mongoose working with Redis.
Simple and efficient mongoose redis caching solution
A simple Mongoose Redis caching module.
npm i mongoose-redis-caching
OR
yarn add mongoose-redis-caching
Require in the module
const mongoose = require("mongoose");
const mongooseRedisCaching = require("mongoose-redis-caching");
Configure your mongoose caching instance
mongooseRedisCaching(mongoose);
Add your own Redis URL to your .env file. The default is set to your local redis instance.
Then use as below (with Caching & no compression):
const blogs = await Blog.find({ _user: req.user.id }).cache();
With time expiration (in seconds, default is 60 sec):
const blogs = await Blog.find({ _user: req.user.id }).cache(15);
Use as below (without Caching):
const blogs = await Blog.find({ _user: req.user.id });
MIT
FAQs
A simple caching solution for Mongoose working with Redis.
The npm package mongoose-redis-caching receives a total of 12 weekly downloads. As such, mongoose-redis-caching popularity was classified as not popular.
We found that mongoose-redis-caching 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
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.