tricache 0.9.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -3
- package/dist/{cache-service-KI5ACF3F.js → cache-service-26GCO3UU.js} +3 -3
- package/dist/{cache-service-DVvroyqA.d.ts → cache-service-pJ-nFcVj.d.ts} +29 -12
- package/dist/{chunk-XZL45ABR.js → chunk-2AJKEQMZ.js} +54 -1
- package/dist/{chunk-PL5J3ZNT.js → chunk-7SZSQS55.js} +201 -34
- package/dist/{chunk-LJ5QJB5O.js → chunk-UBWLPKTI.js} +127 -11
- package/dist/cli.cjs +376 -50
- package/dist/cli.js +4 -4
- package/dist/dashboard/index.d.ts +2 -2
- package/dist/drizzle/index.cjs +384 -51
- package/dist/drizzle/index.d.ts +2 -2
- package/dist/drizzle/index.js +1 -1
- package/dist/edge/index.cjs +64 -8
- package/dist/edge/index.d.ts +3 -3
- package/dist/edge/index.js +37 -9
- package/dist/hono/index.cjs +384 -51
- package/dist/hono/index.d.ts +2 -2
- package/dist/hono/index.js +1 -1
- package/dist/{hono-VA9A1m0I.d.ts → hono-DuNvciyq.d.ts} +4 -4
- package/dist/http/index.cjs +384 -51
- package/dist/http/index.d.ts +3 -3
- package/dist/http/index.js +8 -8
- package/dist/index.cjs +385 -49
- package/dist/index.d.ts +35 -6
- package/dist/index.js +16 -6
- package/dist/nestjs/index.cjs +375 -49
- package/dist/nestjs/index.d.ts +2 -2
- package/dist/nestjs/index.js +4 -4
- package/dist/next/index.cjs +375 -49
- package/dist/next/index.d.ts +2 -2
- package/dist/next/index.js +3 -3
- package/dist/prisma/index.d.ts +2 -2
- package/dist/serialize-worker.cjs +127 -9
- package/dist/serialize-worker.js +8 -4
- package/dist/{types-B_QkVwJ7.d.ts → types-5HXqBfAf.d.ts} +51 -7
- package/package.json +7 -4
- package/src/cache-service.ts +238 -33
- package/src/cli.ts +1 -1
- package/src/compression.ts +193 -15
- package/src/cross-region.ts +1 -1
- package/src/edge/cache.ts +38 -11
- package/src/env.d.ts +13 -0
- package/src/index.ts +9 -1
- package/src/serialize-worker.ts +6 -2
- package/src/types.ts +43 -5
- package/src/utils/tag-matcher.ts +90 -0
- /package/dist/{chunk-QNU7B43J.js → chunk-VXFTFZ5N.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as ICacheTracer } from './types-
|
|
1
|
+
import { I as ICacheTracer, a as InvalidateTagOptions } from './types-5HXqBfAf.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Pluggable asynchronous key-value storage adapter for Edge runtimes (L2 tier).
|
|
@@ -263,7 +263,7 @@ declare class EdgeCacheService {
|
|
|
263
263
|
set<T>(key: string, value: T, ttlSeconds?: number, options?: {
|
|
264
264
|
tags?: string[];
|
|
265
265
|
swr?: number;
|
|
266
|
-
}): Promise<void>;
|
|
266
|
+
} | string[]): Promise<void>;
|
|
267
267
|
/**
|
|
268
268
|
* Deletes a key from all tiers.
|
|
269
269
|
*/
|
|
@@ -271,7 +271,7 @@ declare class EdgeCacheService {
|
|
|
271
271
|
/**
|
|
272
272
|
* Invalidates all cached entries associated with a tag.
|
|
273
273
|
*/
|
|
274
|
-
invalidateTag(tag: string): Promise<void>;
|
|
274
|
+
invalidateTag(tag: string, opts?: InvalidateTagOptions): Promise<void>;
|
|
275
275
|
/**
|
|
276
276
|
* Clears all entries from the edge cache.
|
|
277
277
|
*/
|
|
@@ -279,7 +279,7 @@ declare class EdgeCacheService {
|
|
|
279
279
|
/**
|
|
280
280
|
* Batch get with miss-fetching.
|
|
281
281
|
*/
|
|
282
|
-
mget<T>(keys: string[], fetchFn?: (missKeys: string[]) => Promise<Record<string, T>>, ttlSeconds?: number): Promise<(T | null)[]>;
|
|
282
|
+
mget<T>(keys: string[], fetchFn?: (missKeys: string[]) => Promise<Record<string, T> | Map<string, T>>, ttlSeconds?: number): Promise<(T | null)[]>;
|
|
283
283
|
/**
|
|
284
284
|
* Serializes active, unexpired L1 entries into a snapshot string (encrypted if WebCrypto encryption is enabled).
|
|
285
285
|
* Ideal for persisting Edge state to Cloudflare R2 before worker restart.
|