@suspensive/cache
Advanced tools
Comparing version 0.2.7 to 0.3.0
@@ -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>; |
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
130379
1956