
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
cachemanager
Advanced tools
A very simple cache manager
CacheManager's sole point is to keep track of how much memory is cached and remove things from the cache when new things are added and there's no more space.
var CacheManager = require('cachemanager');
var cacheManager = new CacheManager();
var id = "foo";
var content = "bar";
cacheManager.cache(id, content);
var cachedContent = cacheManager.get(id);
Cache(options)
options are optional
cacheSizeLimit
the number of bytes the cache can hold. Defaults to 64 meg.
Cache.cache(id, content, opt_size)
Adds content to the cache. Content is assumed to be some object with a 'length' field but if not you can pass in a size as the 3rd argument. For example to cache strings you might want to do
cacheManager.cache(id, someString, someString.length * 2)
Since strings in JavaScript used at least 2 bytes per character.
Cache.uncache(id)
allows you to remove an a specific object from the cache. id
can be a single id
or an array of ids.
Cache.setCacheLimit
Changes the cache's size limit. If it's over this limit things will be removed from the cache until it's under the limit.
Cache.clear
clears the cache
FAQs
Manages a cache
The npm package cachemanager receives a total of 10 weekly downloads. As such, cachemanager popularity was classified as not popular.
We found that cachemanager 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
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.