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

node-cache

Package Overview
Dependencies
Maintainers
2
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-cache

Simple and fast NodeJS internal caching. Node internal in memory cache like memcached.

  • 5.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.2M
decreased by-4.9%
Maintainers
2
Weekly downloads
 
Created

What is node-cache?

The node-cache package is a simple caching library for Node.js that provides in-memory cache functionality. It allows for storing and retrieving data from a temporary cache, which can help improve the performance of applications by reducing the need to fetch or compute the same data multiple times.

What are node-cache's main functionalities?

Set and Get Cache Items

This feature allows you to store a value with a key in the cache for a specified duration (in milliseconds). You can then retrieve the value using the key.

{"set": "cache.set('myKey', 'myValue', 10000)", "get": "cache.get('myKey')"}

Delete Cache Items

This feature enables you to delete a specific item from the cache using its key.

{"del": "cache.del('myKey')"}

Check if a Key Exists

This feature allows you to check if a key exists in the cache without retrieving its value.

{"has": "cache.has('myKey')"}

Flush All Cache Data

This feature clears the entire cache, removing all stored key-value pairs.

{"flushAll": "cache.flushAll()"}

Get Cache Statistics

This feature provides statistics about the cache, such as the number of items stored, hits, misses, and keyspace information.

{"getStats": "cache.getStats()"}

Other packages similar to node-cache

Keywords

FAQs

Package last updated on 01 Jul 2020

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