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.
Files changed (43) hide show
  1. package/README.md +1 -1
  2. package/dist/{cache-service-pJ-nFcVj.d.ts → cache-service-CREOp7MM.d.ts} +29 -1
  3. package/dist/{cache-service-26GCO3UU.js → cache-service-MG7PN6MX.js} +1 -1
  4. package/dist/{chunk-VXFTFZ5N.js → chunk-3I5L7K6I.js} +17 -0
  5. package/dist/{chunk-7SZSQS55.js → chunk-JYQFQJNJ.js} +533 -295
  6. package/dist/cli.cjs +534 -296
  7. package/dist/cli.js +2 -2
  8. package/dist/dashboard/index.d.ts +2 -2
  9. package/dist/drizzle/index.cjs +533 -295
  10. package/dist/drizzle/index.d.ts +2 -2
  11. package/dist/drizzle/index.js +1 -1
  12. package/dist/edge/index.cjs +55 -32
  13. package/dist/edge/index.d.ts +3 -3
  14. package/dist/edge/index.js +55 -32
  15. package/dist/hono/index.cjs +533 -295
  16. package/dist/hono/index.d.ts +2 -2
  17. package/dist/hono/index.js +1 -1
  18. package/dist/{hono-DuNvciyq.d.ts → hono-DSV2ve66.d.ts} +8 -1
  19. package/dist/http/index.cjs +585 -316
  20. package/dist/http/index.d.ts +3 -3
  21. package/dist/http/index.js +55 -24
  22. package/dist/index.cjs +550 -295
  23. package/dist/index.d.ts +5 -4
  24. package/dist/index.js +2 -2
  25. package/dist/nestjs/index.cjs +533 -295
  26. package/dist/nestjs/index.d.ts +2 -2
  27. package/dist/nestjs/index.js +2 -2
  28. package/dist/next/index.cjs +535 -303
  29. package/dist/next/index.d.ts +2 -2
  30. package/dist/next/index.js +3 -9
  31. package/dist/prisma/index.d.ts +2 -2
  32. package/dist/{types-5HXqBfAf.d.ts → types-Dyip5wAl.d.ts} +2 -0
  33. package/package.json +1 -1
  34. package/src/adapters/node-redis.ts +19 -0
  35. package/src/cache-service.ts +599 -320
  36. package/src/cli.ts +1 -1
  37. package/src/edge/cache.ts +60 -35
  38. package/src/http/express.ts +55 -16
  39. package/src/http/fastify.ts +3 -7
  40. package/src/next/cache-handler.ts +1 -4
  41. package/src/next/isr-handler.ts +1 -4
  42. package/src/smart-memory-cache.ts +3 -2
  43. package/src/types.ts +2 -0
@@ -1,5 +1,5 @@
1
- import { C as CacheService } from '../cache-service-pJ-nFcVj.js';
2
- import { W as WrapOptions } from '../types-5HXqBfAf.js';
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
 
@@ -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-26GCO3UU.js");
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-5HXqBfAf.js';
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
  */