
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
js-caches 缓存库提供了三种高效的缓存策略:最近最少使用(LRU)、先进先出(FIFO)和最不经常使用(LFU)。它旨在帮助开发者轻松地在他们的应用程序中实现数据缓存机制,从而提高性能和响应速度。
$ npm install your-cache-library-name
import { LRUCahche, FIFOCache, LFUCache } from 'js-caches';
const cache = new LRUCahche<number, number>(3);
cache.put(1, 9);
cache.put(2, 8);
cache.put(3, 7);
cache.put(4, 6); // 超出最大缓存容量,淘汰key为1的缓存(最近最少使用)
cache.has(1) // false
cache.get(1) // null
cache.get(2); // key为2的缓存成为最近使用的缓存
cache.put(5, 10); // 超出最大缓存容量,淘汰key为3的缓存(最近最少使用)
cache.has(3) // false
cache.get(3)) // null
实例化一个缓存对象
根据提供的键(key)从缓存中检索一个值。如果键存在,则返回对应的值;如果不存在,则返回null
将一个值(value)与一个键(key)关联并加入到缓存中。如果缓存已经达到其配置的最大容量,则根据缓存策略(LRU、FIFO、LFU)淘汰一个现有的项目
检查缓存中是否存在指定的键(key)
欢迎贡献!如果你有好的想法或者发现了bug,请通过issue或者pull request与我联系
这个项目采用 MIT许可证
FAQs
A simple cache library for js
We found that js-caches 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.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.