🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@suspensive/cache

Package Overview
Dependencies
Maintainers
0
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@suspensive/cache - npm Package Compare versions

Comparing version

to
0.3.0

dist/chunk-UTDQZXTL.js

1

dist/CacheStore.d.ts

@@ -79,2 +79,3 @@ import { CacheKey, CacheOptions } from './types.js';

reset: (options?: Pick<CacheOptions<unknown, CacheKey>, "cacheKey">) => void;
remove: (options: Pick<CacheOptions<unknown, CacheKey>, "cacheKey">) => void;
clearError: (options?: Pick<CacheOptions<unknown, CacheKey>, "cacheKey">) => void;

@@ -81,0 +82,0 @@ suspend: <TData, TCacheKey extends CacheKey = CacheKey>({ cacheKey, cacheFn, }: CacheOptions<TData, TCacheKey>) => ResolvedCached<TData, TCacheKey>;

2

dist/CacheStore.js
"use client"
import {
CacheStore
} from "./chunk-KPMQITEL.js";
} from "./chunk-UTDQZXTL.js";
import "./chunk-QETBZSG5.js";

@@ -6,0 +6,0 @@ export {

@@ -7,3 +7,3 @@ "use client"

CacheStore
} from "./chunk-KPMQITEL.js";
} from "./chunk-UTDQZXTL.js";
import {

@@ -10,0 +10,0 @@ CacheStoreProvider

{
"name": "@suspensive/cache",
"version": "0.2.7",
"version": "0.3.0",
"description": "Useful interfaces for React Suspense",

@@ -48,5 +48,5 @@ "keywords": [

"react-dom": "^18.3.1",
"@suspensive/eslint-config": "0.0.0",
"@suspensive/react": "2.10.0",
"@suspensive/tsconfig": "0.0.0-development",
"@suspensive/eslint-config": "0.0.0",
"@suspensive/tsup": "0.0.0"

@@ -53,0 +53,0 @@ },

@@ -98,2 +98,10 @@ import type { CacheKey, CacheOptions } from './types'

public remove = (options: Pick<CacheOptions<unknown, CacheKey>, 'cacheKey'>) => {
const hashedCacheKey = hashCacheKey(options.cacheKey)
if (this.cacheStore.has(hashedCacheKey)) {
this.cacheStore.delete(hashedCacheKey)
}
}
public clearError = (options?: Pick<CacheOptions<unknown, CacheKey>, 'cacheKey'>) => {

@@ -100,0 +108,0 @@ if (options?.cacheKey === undefined || options.cacheKey.length === 0) {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet