@@ -16,19 +16,19 @@ import { unstable_readConfig } from "wrangler";
16
16
17
17
import {
18
18
BINDING_NAME as KV_CACHE_BINDING_NAME ,
19
- computeCacheKey as computeKVCacheKey ,
20
19
NAME as KV_CACHE_NAME ,
20
+ PREFIX_ENV_NAME as KV_CACHE_PREFIX_ENV_NAME ,
21
21
} from "../../api/overrides/incremental-cache/kv-incremental-cache.js" ;
22
22
import {
23
23
BINDING_NAME as R2_CACHE_BINDING_NAME ,
24
- computeCacheKey as computeR2CacheKey ,
25
24
NAME as R2_CACHE_NAME ,
26
25
PREFIX_ENV_NAME as R2_CACHE_PREFIX_ENV_NAME ,
27
26
} from "../../api/overrides/incremental-cache/r2-incremental-cache.js" ;
28
27
import {
29
28
CACHE_DIR as STATIC_ASSETS_CACHE_DIR ,
30
29
NAME as STATIC_ASSETS_CACHE_NAME ,
31
30
} from "../../api/overrides/incremental-cache/static-assets-incremental-cache.js" ;
31
+ import { computeCacheKey } from "../../api/overrides/internal.js" ;
32
32
import {
33
33
BINDING_NAME as D1_TAG_BINDING_NAME ,
34
34
NAME as D1_TAG_NAME ,
@@ -113,8 +113,8 @@ function populateR2IncrementalCache(
113
113
const assets = getCacheAssets ( options ) ;
114
114
115
115
for ( const { fullPath, key, buildId, isFetch } of tqdm ( assets ) ) {
116
- const cacheKey = computeR2CacheKey ( key , {
117
- directory : process . env [ R2_CACHE_PREFIX_ENV_NAME ] ,
116
+ const cacheKey = computeCacheKey ( key , {
117
+ prefix : process . env [ R2_CACHE_PREFIX_ENV_NAME ] ,
118
118
buildId,
119
119
isFetch,
120
120
} ) ;
@@ -146,7 +146,8 @@ function populateKVIncrementalCache(
146
146
const assets = getCacheAssets ( options ) ;
147
147
148
148
for ( const { fullPath, key, buildId, isFetch } of tqdm ( assets ) ) {
149
- const cacheKey = computeKVCacheKey ( key , {
149
+ const cacheKey = computeCacheKey ( key , {
150
+ prefix : process . env [ KV_CACHE_PREFIX_ENV_NAME ] ,
150
151
buildId,
151
152
isFetch,
152
153
} ) ;
0 commit comments