
Security News
Open Source CAI Framework Handles Pen Testing Tasks up to 3,600× Faster Than Humans
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
localstorage-cache
Advanced tools
storage
<script src="localstorage-cache.js"></script>
$ npm i -g localstorage-cache
$ npm i --save localstorage-cache
import LocalStorageCache from 'localstorage-cache';
/*
* Set cache size: 2 * 1024KB(2MB)
* set cache strategy: LRU / LFU;
*/
const storageCache = new LocalStorageCache(2 * 1024, 'LRU'); //
/**
* set cache, and unit of expire is second.
* @param {string/number} key
* @param {any} value
* @param {number} [expire]
* @param {string} [charset]
*/
storageCache.setCache('name', 'lzwaiwai', 'utf8').setCache('age', 18);
storageCache.setCache('work', 'IT', 24 * 60 * 60);
/**
* get cache by key.
* @param {string/number} key
* @returns
*/
const cacheWork = storageCache.getCache('work');
console.log(cacheWork);
/**
* delete cache by key.
* @param {string/number} key
*/
storageCache.deleteCache('age');
/**
* delete all cache.
*/
storageCache.clearCache();
...
FAQs
storage
The npm package localstorage-cache receives a total of 20 weekly downloads. As such, localstorage-cache popularity was classified as not popular.
We found that localstorage-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
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.