
Research
wget to Wipeout: Malicious Go Modules Fetch Destructive Payload
Socket's research uncovers three dangerous Go modules that contain obfuscated disk-wiping malware, threatening complete data loss.
fast-node-cache
Advanced tools
Simple yet powerful cache used by PreMiD.
Caching is one of the most important things to do in production; futhermore, preventing your databases from getting bombarded with requests or to cache results from an API which only allows a certain amount of requests.
# npm
$ npm i fast-node-cache
# yarn
$ yarn add fast-node-cache
A CacheManager is the main entry to access, set and listen to events from the cache.
cacheManager = new CacheManager(options?);
The CacheManager has a set of options that can be changed:
Option | Type | Default Value | Description |
---|---|---|---|
memoryOnly? | boolean | true | Wether or not the cache is stored in memory (RAM) only or should be saved to a file as well as an redundancy measure. |
cacheDirectory? | string | __dirname + .cache | Allows to change the default cache folder that's used to load and save the cache. |
defaultExpire? | number | 300000 (5 minutes) | Changes the default time in miliseconds when cache is considered outdated. |
checkInterval? | number | 250 (4 times a second) | Changes the default checkInterval to check for outdated caches. |
discardTamperedCache | boolean | false | Wether or not to delete corrupted cache on startup |
//* Emitted when the cache is updated
cacheManager.on(event: "update", listener: Function<name:string, data:any>, options?: {only?:string[] | string})
//* Emitted when the cache is outdated
cacheManager.on(event: "outdated", listener: Function<name:string, data:any>, options?: {only?:string[] | string})
cacheManager.set(name: string, data: any, expires?: number)
cacheManager.get(name: string)
cacheManager.isExpired(name: string)
cacheManager.keys()
cacheManager.values()
cacheManager.entries()
FAQs
A simple and powerful cache.
We found that fast-node-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.
Research
Socket's research uncovers three dangerous Go modules that contain obfuscated disk-wiping malware, threatening complete data loss.
Research
Socket uncovers malicious packages on PyPI using Gmail's SMTP protocol for command and control (C2) to exfiltrate data and execute commands.
Product
We redesigned Socket's first logged-in page to display rich and insightful visualizations about your repositories protected against supply chain threats.