
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
quick-cache
Advanced tools
Script for storing JavaScript objects in the localStorage, if available. The script has a timeout feature that will return a null if the data has expired.
##Usage ####initialize
with 2s expiration and an error callback handler
var cache = new QuickCache(2000, function(error){/*handle error*/});
with no expiration and an error callback handler
var cache = new QuickCache(function(error){/*handle error*/});
with 2s expiration
var cache = new QuickCache(2000);
with no expiration
var cache = new QuickCache();
####store data
cache.set('terms',{a:'1',b:'2',c:'3'});
####retrieve data
var termData = cache.get('terms');
with the first
cachevariable above if you did not get the data within 2s it would return anull. on the secondcachethe data would be{a:'1',b:'2',c:'3'}because a timeout does not exist.
##Why Timeout? Fair enough. Lets say you have some data in a hybrid application. This data may change once a month or once a week. It's not really critical data, but you would like to check for it every once and a while.
\\create cache object to expire once a week
var colorCache = new QuickCache((1000 * 60 * 60 * 24 * 7));
\\try to get colors from cache
var colors = colorCache.get('colors');
\\if colors don't exist or are expired get the latest
if(!colors){
//call external to get colors
colors = getColors();
//refresh the cache
colorCache.set('colors',colors);
}
FAQs
Helper script for storing JavaScript objects in the localStorage, if available.
We found that quick-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.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.