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
package/dist/http/index.js
CHANGED
|
@@ -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-
|
|
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-
|
|
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-
|
|
222
|
+
const { CacheService } = await import("../cache-service-26GCO3UU.js");
|
|
223
223
|
activeCache = CacheService.create();
|
|
224
224
|
}
|
|
225
225
|
const key = buildDeterministicKey(req, {
|