
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
[sm]art + c[ache] = smache
Smache 是一个方便的内存缓存模块,可以通过一些简单缓存策略避免无限占用更多的内存,同时确保最常用最应该被缓存的对象被缓存。
GitHub: https://github.com/Houfeng/smache
npm install smache --save
const Cache = require('smache');
//创建实例
var cache = new Cache({
//最多缓存的对象数量,省略时表示不做数量限制
//在达到最大数量时,会移除「最久没用到的」的缓存项
max: 1000,
//最长缓存生命周期,单位毫秒,省略时表示永久
//到期时自动移除
ttl: 1000 * 60
});
//添加
cache.set(key,value);
cache.set(key,value,ttl); //可以单设定某项的 ttl
//获取
var value = cache.get(key);
//移除
cache.remove(key);
//清空
cache.clear();
FAQs
Smart caching module
We found that smache 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.