
Company News
Socket Joins New OpenJS Program to Fund Node.js Security Work
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.
Portable key-value cache that auto-selects the best storage backend
npm install portacache
import createCache from 'portacache';
const cache = createCache({ttl: 5000});
await cache.set('user', {name: 'Alice'});
await cache.get('user');
//=> {name: 'Alice'}
await cache.has('user');
//=> true
await cache.delete('user');
//=> true
await cache.clear();
Returns a cache instance with get, set, has, delete, and clear methods. All methods are async and return promises.
Type: object
Type: 'auto' | 'memory'
Default: 'auto'
The storage backend to use. Currently defaults to an in-memory Map store.
Type: number
Default TTL in milliseconds for cache entries.
Returns the cached value, or undefined if not found or expired.
Store a value in the cache. Optionally pass a per-entry ttl in milliseconds that overrides the default.
Returns true if the key exists and has not expired.
Delete a key from the cache. Returns true if the key was deleted.
Clear all entries from the cache.
MIT
FAQs
Portable key-value cache that auto-selects the best storage backend
We found that portacache demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Company News
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.

Research
/Security News
A malicious Firefox extension fetches its payload after installation to evade detection, steal Google session cookies, and automate account takeover.