Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More β†’
Socket
Sign inDemoInstall
Socket

cacache

Package Overview
Dependencies
Maintainers
6
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cacache

Fast, fault-tolerant, cross-platform, disk-based, data-agnostic, content-addressable cache.

  • 19.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
25M
decreased by-9.31%
Maintainers
6
Weekly downloads
Β 
Created

What is cacache?

The cacache npm package is a local key and content addressable cache that stores data reliably, with an API that supports fetching, inserting, and deleting cache data. It is primarily used for caching data that can be retrieved by a unique key, and it ensures data integrity by using content-addressable storage.

What are cacache's main functionalities?

Getting data from cache

This feature allows you to retrieve data from the cache using a unique key. If the data is present and the integrity checks out, it will be returned.

const cacache = require('cacache');
const key = 'my-key';
cacache.get('/path/to/cache', key).then(console.log);

Inserting data into cache

This feature is used to insert data into the cache. The data is stored with a unique key, and its integrity is verified upon retrieval.

const cacache = require('cacache');
const key = 'my-key';
const data = 'some data to cache';
cacache.put('/path/to/cache', key, data).then(console.log);

Deleting data from cache

This feature allows you to remove data from the cache using the associated key. This is useful for invalidating or updating cached data.

const cacache = require('cacache');
const key = 'my-key';
cacache.rm.entry('/path/to/cache', key).then(console.log);

Other packages similar to cacache

Keywords

FAQs

Package last updated on 27 Sep 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚑️ by Socket Inc