
Security News
rv Is a New Rust-Powered Ruby Version Manager Inspired by Python's uv
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
nodex-cache
Advanced tools
A simple caching module for node js that has
set
,get
anddelete
methods. Keys can have a timeout (ttl) after which they expire and are deleted from the cache.
npm i --save nodex-cache
const node_cache = require('nodex-cache');
let { cache, expire } = node_cache;
const simpleCache = cache();
simpleCache.set('a', 1)
simpleCache.set('b', 3)
console.log(simpleCache.remove('b')) // 3
console.log(simpleCache.get('a')) // 1
console.log(simpleCache.remove('b')) // undefined
const expirationHandler = (key, value) => {
console.log(`expired ${key}: ${value}`) // expired b: 2
}
const expiringCache = expire(cache(), expirationHandler)
expiringCache.set('a', 1, 1000)
expiringCache.set('b', 2) //default expiry is 1000
expiringCache.set('c', 3) //default expiry is 1000
console.log(expiringCache.remove('b')) // 2
console.log(expiringCache.get('a')) // 1
setTimeout(() => {
console.log(expiringCache.get('a')) // undefined
}, 1200)
MIT © Liju Kuriakose
FAQs
A simple node js cache manager
We found that nodex-cache 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
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.