
Research
PyPI Package Impersonates SymPy to Deliver Cryptomining Malware
Malicious PyPI package sympy-dev targets SymPy users, a Python symbolic math library with 85 million monthly downloads.
Small cache abstraction that auto GCs unref'ed objects after a max size has been reached
Small cache abstraction that auto GCs unref'ed objects after a max size has been reached.
npm install refcache
const Refcache = require('refcache')
const cache = new Refcache({
maxSize: 1000, // set the max cache of unreffed objects
open (key, opts) {
// return the thing you wanna cache
},
close (thing) {
// close the thing you opened
}
})
const checkout = cache.checkout(Buffer.from('some-key'), {
...someOptions
})
// use checkout.value ...
// then let the cache know you are done with it
checkout.checkin()
cache = new Refcache(options)Make a new cache instance. Options include:
{
maxSize, // how many unreffed objects to cache
open(key, opts), // make a new instance to cache
close(instance) // close a cached instance
}
checkout = cache.checkout(key, [options])Checkout a value from the cache. If not present it is auto opened. Every checkout you do is reference counted, and only cached values with no references are closed after the max size is reached.
If you do not want to ref count this particular checkout pass { weak: true }
to the options. All options are forwarded to open.
bool = cache.has(key)Check if the cache has a specific key loaded.
checkout.checkin()Call this when you are done with the value. You may only call this once.
checkout.closedWhether or not this entry has been closed.
checkout.valueThe value returned from open.
checkout.remove()Force remove this value from the cache.
checkout.bump()Bumps this value in the internal LRU.
MIT
FAQs
Small cache abstraction that auto GCs unref'ed objects after a max size has been reached
The npm package refcache receives a total of 0 weekly downloads. As such, refcache popularity was classified as not popular.
We found that refcache 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
Malicious PyPI package sympy-dev targets SymPy users, a Python symbolic math library with 85 million monthly downloads.

Product
Create and share saved alert views with custom tabs on the org alerts page, making it easier for teams to return to consistent, named filter sets.

Product
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.