tricache 1.0.0 → 1.0.1
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 +1 -1
- package/dist/{cache-service-pJ-nFcVj.d.ts → cache-service-CREOp7MM.d.ts} +29 -1
- package/dist/{cache-service-26GCO3UU.js → cache-service-MG7PN6MX.js} +1 -1
- package/dist/{chunk-VXFTFZ5N.js → chunk-3I5L7K6I.js} +17 -0
- package/dist/{chunk-7SZSQS55.js → chunk-JYQFQJNJ.js} +533 -295
- package/dist/cli.cjs +534 -296
- package/dist/cli.js +2 -2
- package/dist/dashboard/index.d.ts +2 -2
- package/dist/drizzle/index.cjs +533 -295
- package/dist/drizzle/index.d.ts +2 -2
- package/dist/drizzle/index.js +1 -1
- package/dist/edge/index.cjs +55 -32
- package/dist/edge/index.d.ts +3 -3
- package/dist/edge/index.js +55 -32
- package/dist/hono/index.cjs +533 -295
- package/dist/hono/index.d.ts +2 -2
- package/dist/hono/index.js +1 -1
- package/dist/{hono-DuNvciyq.d.ts → hono-DSV2ve66.d.ts} +8 -1
- package/dist/http/index.cjs +585 -316
- package/dist/http/index.d.ts +3 -3
- package/dist/http/index.js +55 -24
- package/dist/index.cjs +550 -295
- package/dist/index.d.ts +5 -4
- package/dist/index.js +2 -2
- package/dist/nestjs/index.cjs +533 -295
- package/dist/nestjs/index.d.ts +2 -2
- package/dist/nestjs/index.js +2 -2
- package/dist/next/index.cjs +535 -303
- package/dist/next/index.d.ts +2 -2
- package/dist/next/index.js +3 -9
- package/dist/prisma/index.d.ts +2 -2
- package/dist/{types-5HXqBfAf.d.ts → types-Dyip5wAl.d.ts} +2 -0
- package/package.json +1 -1
- package/src/adapters/node-redis.ts +19 -0
- package/src/cache-service.ts +599 -320
- package/src/cli.ts +1 -1
- package/src/edge/cache.ts +60 -35
- package/src/http/express.ts +55 -16
- package/src/http/fastify.ts +3 -7
- package/src/next/cache-handler.ts +1 -4
- package/src/next/isr-handler.ts +1 -4
- package/src/smart-memory-cache.ts +3 -2
- package/src/types.ts +2 -0
package/dist/hono/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CacheService } from '../cache-service-
|
|
2
|
-
import { W as WrapOptions } from '../types-
|
|
1
|
+
import { C as CacheService } from '../cache-service-CREOp7MM.js';
|
|
2
|
+
import { W as WrapOptions } from '../types-Dyip5wAl.js';
|
|
3
3
|
import { K as KeyDerivationOptions } from '../utils-CEsU_Z0s.js';
|
|
4
4
|
import 'crypto';
|
|
5
5
|
|
package/dist/hono/index.js
CHANGED
|
@@ -143,7 +143,7 @@ function cacheMiddleware(options = {}) {
|
|
|
143
143
|
return await next();
|
|
144
144
|
}
|
|
145
145
|
if (!resolvedCache) {
|
|
146
|
-
const { CacheService } = await import("../cache-service-
|
|
146
|
+
const { CacheService } = await import("../cache-service-MG7PN6MX.js");
|
|
147
147
|
resolvedCache = CacheService.create();
|
|
148
148
|
}
|
|
149
149
|
const activeCache = resolvedCache;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as ICacheTracer, a as InvalidateTagOptions } from './types-
|
|
1
|
+
import { I as ICacheTracer, a as InvalidateTagOptions } from './types-Dyip5wAl.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Pluggable asynchronous key-value storage adapter for Edge runtimes (L2 tier).
|
|
@@ -238,6 +238,7 @@ declare class EdgeCacheService {
|
|
|
238
238
|
private currentBytes;
|
|
239
239
|
private readonly inflight;
|
|
240
240
|
private readonly tagIndex;
|
|
241
|
+
private static readonly MAX_TAG_VERSION_CACHE;
|
|
241
242
|
private readonly tagVersionCache;
|
|
242
243
|
private readonly tagVersionTtlMs;
|
|
243
244
|
constructor(options?: EdgeCacheOptions);
|
|
@@ -250,6 +251,7 @@ declare class EdgeCacheService {
|
|
|
250
251
|
private _evictIfNeeded;
|
|
251
252
|
private _deleteL1;
|
|
252
253
|
private _startSpan;
|
|
254
|
+
private _setTagVersionCache;
|
|
253
255
|
private _getTagVersion;
|
|
254
256
|
private _batchGetTagVersions;
|
|
255
257
|
/**
|
|
@@ -268,6 +270,11 @@ declare class EdgeCacheService {
|
|
|
268
270
|
* Deletes a key from all tiers.
|
|
269
271
|
*/
|
|
270
272
|
delete(key: string): Promise<void>;
|
|
273
|
+
/**
|
|
274
|
+
* Executes invalidation for a single already-resolved concrete tag without
|
|
275
|
+
* re-entering wildcard/cascade resolution.
|
|
276
|
+
*/
|
|
277
|
+
private _invalidateConcreteTag;
|
|
271
278
|
/**
|
|
272
279
|
* Invalidates all cached entries associated with a tag.
|
|
273
280
|
*/
|