
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
@drecom/idb-cache
Advanced tools
idb-cache is a fast and simple cache library for JavaScript using IndexedDB
idb-cache is a fast and simple cache library for JavaScript using IndexedDB.
IndexedDB is persistent storage, but idb-cache automatically destroys old files. Therefore, users do not have to worry about storage pressure due to garbage files.
const idbc = new IDBCache('examplesDB', {
size : 52428800, // Size limit (Default 50MB)
count : 100, // Number of files limit (Default 100)
defaultAge : 86400, // max-age when there is no setting (Default 1day)
});
// Designate max-age
idbc.set('key1', 'value1'); // defaultAge cache
idbc.set('key2', 'value2', 604800); // 1week cache
// Supported type
idbc.set('key3', new ArrayBuffer(512)); // ArrayBuffer
idbc.set('key4', new Blob([new ArrayBuffer(1024)])); // Blob
idbc.get('key1').then(function(value){
console.log(value);
}).catch(function(){
// Does not exist, expired or error
});
idb-cache is focused on support of the following browsers.
FAQs
idb-cache is a fast and simple cache library for JavaScript using IndexedDB
The npm package @drecom/idb-cache receives a total of 31 weekly downloads. As such, @drecom/idb-cache popularity was classified as not popular.
We found that @drecom/idb-cache demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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.

Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.

Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.

Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.