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.
Files changed (47) hide show
  1. package/README.md +7 -3
  2. package/dist/{cache-service-KI5ACF3F.js → cache-service-26GCO3UU.js} +3 -3
  3. package/dist/{cache-service-DVvroyqA.d.ts → cache-service-pJ-nFcVj.d.ts} +29 -12
  4. package/dist/{chunk-XZL45ABR.js → chunk-2AJKEQMZ.js} +54 -1
  5. package/dist/{chunk-PL5J3ZNT.js → chunk-7SZSQS55.js} +201 -34
  6. package/dist/{chunk-LJ5QJB5O.js → chunk-UBWLPKTI.js} +127 -11
  7. package/dist/cli.cjs +376 -50
  8. package/dist/cli.js +4 -4
  9. package/dist/dashboard/index.d.ts +2 -2
  10. package/dist/drizzle/index.cjs +384 -51
  11. package/dist/drizzle/index.d.ts +2 -2
  12. package/dist/drizzle/index.js +1 -1
  13. package/dist/edge/index.cjs +64 -8
  14. package/dist/edge/index.d.ts +3 -3
  15. package/dist/edge/index.js +37 -9
  16. package/dist/hono/index.cjs +384 -51
  17. package/dist/hono/index.d.ts +2 -2
  18. package/dist/hono/index.js +1 -1
  19. package/dist/{hono-VA9A1m0I.d.ts → hono-DuNvciyq.d.ts} +4 -4
  20. package/dist/http/index.cjs +384 -51
  21. package/dist/http/index.d.ts +3 -3
  22. package/dist/http/index.js +8 -8
  23. package/dist/index.cjs +385 -49
  24. package/dist/index.d.ts +35 -6
  25. package/dist/index.js +16 -6
  26. package/dist/nestjs/index.cjs +375 -49
  27. package/dist/nestjs/index.d.ts +2 -2
  28. package/dist/nestjs/index.js +4 -4
  29. package/dist/next/index.cjs +375 -49
  30. package/dist/next/index.d.ts +2 -2
  31. package/dist/next/index.js +3 -3
  32. package/dist/prisma/index.d.ts +2 -2
  33. package/dist/serialize-worker.cjs +127 -9
  34. package/dist/serialize-worker.js +8 -4
  35. package/dist/{types-B_QkVwJ7.d.ts → types-5HXqBfAf.d.ts} +51 -7
  36. package/package.json +7 -4
  37. package/src/cache-service.ts +238 -33
  38. package/src/cli.ts +1 -1
  39. package/src/compression.ts +193 -15
  40. package/src/cross-region.ts +1 -1
  41. package/src/edge/cache.ts +38 -11
  42. package/src/env.d.ts +13 -0
  43. package/src/index.ts +9 -1
  44. package/src/serialize-worker.ts +6 -2
  45. package/src/types.ts +43 -5
  46. package/src/utils/tag-matcher.ts +90 -0
  47. /package/dist/{chunk-QNU7B43J.js → chunk-VXFTFZ5N.js} +0 -0
@@ -1,13 +1,13 @@
1
- import {
2
- buildDeterministicKey,
3
- generateETag,
4
- shouldSkipCache
5
- } from "../chunk-BQRURGGD.js";
6
1
  import {
7
2
  buildEdgeDeterministicKey,
8
3
  computeEdgeETag,
9
4
  honoEdgeCache
10
5
  } from "../chunk-IITRFWHY.js";
6
+ import {
7
+ buildDeterministicKey,
8
+ generateETag,
9
+ shouldSkipCache
10
+ } from "../chunk-BQRURGGD.js";
11
11
 
12
12
  // src/http/express.ts
13
13
  function createExpressMiddleware(options = {}) {
@@ -30,7 +30,7 @@ function createExpressMiddleware(options = {}) {
30
30
  }
31
31
  let activeCache = cache;
32
32
  if (!activeCache) {
33
- const { CacheService } = await import("../cache-service-KI5ACF3F.js");
33
+ const { CacheService } = await import("../cache-service-26GCO3UU.js");
34
34
  activeCache = CacheService.create();
35
35
  }
36
36
  const key = buildDeterministicKey(req, { keyGenerator, headerWhitelist });
@@ -135,7 +135,7 @@ function createFastifyPlugin(options = {}) {
135
135
  const ttl = mergedOpts.ttl ?? 300;
136
136
  let activeCache = mergedOpts.cache;
137
137
  if (!activeCache) {
138
- const { CacheService } = await import("../cache-service-KI5ACF3F.js");
138
+ const { CacheService } = await import("../cache-service-26GCO3UU.js");
139
139
  activeCache = CacheService.create();
140
140
  }
141
141
  fastify.addHook("onRequest", async (req, reply) => {
@@ -219,7 +219,7 @@ function fastifyCache(options = {}) {
219
219
  if (shouldSkipCache(req, options.skipCache)) return;
220
220
  let activeCache = options.cache;
221
221
  if (!activeCache) {
222
- const { CacheService } = await import("../cache-service-KI5ACF3F.js");
222
+ const { CacheService } = await import("../cache-service-26GCO3UU.js");
223
223
  activeCache = CacheService.create();
224
224
  }
225
225
  const key = buildDeterministicKey(req, {