You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@cacheable/utils

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cacheable/utils - npm Package Compare versions

Comparing version
2.3.4
to
2.4.0
+5
-0
dist/index.d.cts

@@ -155,2 +155,7 @@ /**

throwErrors?: boolean | GetOrSetThrowErrorsContext;
/**
* If set, this will bypass the instances nonBlocking setting for the get call.
* @type {boolean}
*/
nonBlocking?: boolean;
};

@@ -157,0 +162,0 @@ type GetOrSetOptions = GetOrSetFunctionOptions & {

@@ -155,2 +155,7 @@ /**

throwErrors?: boolean | GetOrSetThrowErrorsContext;
/**
* If set, this will bypass the instances nonBlocking setting for the get call.
* @type {boolean}
*/
nonBlocking?: boolean;
};

@@ -157,0 +162,0 @@ type GetOrSetOptions = GetOrSetFunctionOptions & {

+5
-6
{
"name": "@cacheable/utils",
"version": "2.3.4",
"version": "2.4.0",
"description": "Cacheable Utilities for Caching Libraries",

@@ -30,10 +30,9 @@ "type": "module",

"dependencies": {
"hashery": "^1.3.0",
"hashery": "^1.5.0",
"keyv": "^5.6.0"
},
"devDependencies": {
"@faker-js/faker": "^10.2.0",
"@types/node": "^24.10.10",
"lru-cache": "^11.2.4",
"rimraf": "^6.1.2",
"@faker-js/faker": "^10.3.0",
"@types/node": "^25.3.0",
"rimraf": "^6.1.3",
"tsup": "^8.5.1",

@@ -40,0 +39,0 @@ "typescript": "^5.9.3"

@@ -5,3 +5,3 @@ [<img align="center" src="https://cacheable.org/logo.svg" alt="Cacheable" />](https://github.com/jaredwray/cacheable)

[![codecov](https://codecov.io/gh/jaredwray/cacheable/graph/badge.svg?token=lWZ9OBQ7GM)](https://codecov.io/gh/jaredwray/cacheable)
[![codecov](https://codecov.io/gh/jaredwray/cacheable/branch/main/graph/badge.svg?token=lWZ9OBQ7GM)](https://codecov.io/gh/jaredwray/cacheable)
[![tests](https://github.com/jaredwray/cacheable/actions/workflows/tests.yml/badge.svg)](https://github.com/jaredwray/cacheable/actions/workflows/tests.yml)

@@ -484,5 +484,8 @@ [![npm](https://img.shields.io/npm/dm/@cacheable/utils.svg)](https://www.npmjs.com/package/@cacheable/utils)

throwErrors?: boolean;
nonBlocking?: boolean;
};
```
The `nonBlocking` option allows you to override the instance-level `nonBlocking` setting for the `get` call within `getOrSet`. When set to `false`, the `get` will block and wait for a response from the secondary store before deciding whether to call the provided function. When set to `true`, the primary store returns immediately and syncs from secondary in the background.
Here is an example of how to use the `getOrSet` method:

@@ -489,0 +492,0 @@