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

@soundxyz/fine-grained-cache

Package Overview
Dependencies
Maintainers
11
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@soundxyz/fine-grained-cache - npm Package Compare versions

Comparing version 2.3.1 to 2.4.0

16

dist/fineGrained.d.ts

@@ -38,3 +38,3 @@ import type { Redis } from "ioredis";

};
export type Events = typeof Events[keyof typeof Events];
export type Events = (typeof Events)[keyof typeof Events];
export type EventParamsObject = Record<string, string | number | boolean | null | undefined>;

@@ -133,3 +133,3 @@ export type LogEventArgs = {

invalidateCache: (keys_0: string, ...keys_1: (string | number)[]) => Promise<void>;
setCache: ({ populateMemoryCache, ttl, keys, useSuperjson, value, }: {
setCache: <T_1 = unknown>({ populateMemoryCache, ttl, keys, useSuperjson, value, }: {
populateMemoryCache: boolean;

@@ -139,5 +139,15 @@ ttl: StringValue | "Infinity";

useSuperjson: boolean;
value: unknown;
value: T_1;
}) => Promise<void>;
readCache: <T_2 = unknown>({ keys, useSuperjson, }: {
keys: string | [string, ...(string | number)[]];
useSuperjson: boolean;
}) => Promise<{
readonly found: false;
readonly value?: undefined;
} | {
readonly found: true;
readonly value: Awaited<T_2>;
}>;
};
export {};

@@ -563,2 +563,19 @@ 'use strict';

}
function readCache({
keys,
useSuperjson
}) {
const key = generateCacheKey(keys);
return getRedisCacheValue(key, useSuperjson, false).then((value) => {
if (value === NotFoundSymbol) {
return {
found: false
};
}
return {
found: true,
value
};
});
}
return {

@@ -570,3 +587,4 @@ getCached,

invalidateCache,
setCache
setCache,
readCache
};

@@ -573,0 +591,0 @@ }

6

package.json
{
"name": "@soundxyz/fine-grained-cache",
"version": "2.3.1",
"version": "2.4.0",
"description": "Fine-grained cache helper using redis",

@@ -41,3 +41,3 @@ "keywords": [

"@types/node": "^18.11.18",
"ava": "^5.1.0",
"ava": "^5.1.1",
"bob-ts": "^4.1.1",

@@ -56,3 +56,3 @@ "bob-tsm": "^1.1.2",

"peerDependencies": {
"ioredis": "^5.0.6",
"ioredis": "^5.2.4",
"redlock": "5.0.0-beta.2"

@@ -59,0 +59,0 @@ },

Sorry, the diff of this file is not supported yet

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