New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cachu

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cachu - npm Package Compare versions

Comparing version 6.0.0 to 6.0.1

2

package.json
{
"name": "cachu",
"version": "6.0.0",
"version": "6.0.1",
"description": "A simple key-value cache for Node.js.",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

@@ -17,3 +17,6 @@ # cachu

const cache = useCache()
const cache = useCache({
maxAge: '10m', // 10 minutes, can be specified as number (in seconds) or readable string
...
})

@@ -28,23 +31,23 @@ // Add a new entry.

* #### Configuration
* #### Configuration (optional)
* [`maxAge`](https://github.com/azurydev/cachu/blob/dev/guide/guide/config/maxAge.md) to set the **maximum age** for each record in the cache
* [`maxAmount`](https://github.com/azurydev/cachu/blob/dev/guide/config/maxAmount.md) to set the **maximum size** for the cache
* [`autodelete`](https://github.com/azurydev/cachu/blob/dev/guide/config/autodelete.md) to **delete overaged entries** on adding/updating
* `maxAge` to set the **maximum age** for each record in the cache *(defaults to 600s)*
* `maxAmount` to set the **maximum size** for the cache *(defaults to 10000)*
* `autodelete` to **delete overaged entries** on adding/updating *(disabled by default)*
* #### Features
* [`add()`](https://github.com/azurydev/cachu/blob/dev/guide/guide/features/add.md)
* [`addMany()`](https://github.com/azurydev/cachu/blob/dev/guide/guide/features/addMany.md)
* [`get()`](https://github.com/azurydev/cachu/blob/dev/guide/guide/features/get.md)
* [`getMany()`](https://github.com/azurydev/cachu/blob/dev/guide/guide/features/getMany.md)
* [`update()`](https://github.com/azurydev/cachu/blob/dev/guide/guide/features/update.md)
* [`updateMany()`](https://github.com/azurydev/cachu/blob/dev/guide/guide/features/updateMany.md)
* [`remove()`](https://github.com/azurydev/cachu/blob/dev/guide/guide/features/remove.md)
* [`removeMany()`](https://github.com/azurydev/cachu/blob/dev/guide/guide/features/removeMany.md)
* [`has()`](https://github.com/azurydev/cachu/blob/dev/guide/guide/features/has.md)
* [`size()`](https://github.com/azurydev/cachu/blob/dev/guide/guide/features/size.md)
* [`keys()`](https://github.com/azurydev/cachu/blob/dev/guide/guide/features/keys.md)
* [`values()`](https://github.com/azurydev/cachu/blob/dev/guide/guide/features/values.md)
* [`clear()`](https://github.com/azurydev/cachu/blob/dev/guide/guide/features/clear.md)
* `add()`
* `addMany()`
* `get()`
* `getMany()`
* `update()`
* `updateMany()`
* `remove()`
* `removeMany()`
* `has()`
* `size()` *(get the cache size in bytes)*
* `keys()`
* `values()`
* `clear()` *(delete all overaged entries manually)*

@@ -51,0 +54,0 @@ <hr>

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