@@ -16,19 +16,19 @@ import { unstable_readConfig } from "wrangler";
1616
1717import {
1818 BINDING_NAME as KV_CACHE_BINDING_NAME ,
19- computeCacheKey as computeKVCacheKey ,
2019 NAME as KV_CACHE_NAME ,
20+ PREFIX_ENV_NAME as KV_CACHE_PREFIX_ENV_NAME ,
2121} from "../../api/overrides/incremental-cache/kv-incremental-cache.js" ;
2222import {
2323 BINDING_NAME as R2_CACHE_BINDING_NAME ,
24- computeCacheKey as computeR2CacheKey ,
2524 NAME as R2_CACHE_NAME ,
2625 PREFIX_ENV_NAME as R2_CACHE_PREFIX_ENV_NAME ,
2726} from "../../api/overrides/incremental-cache/r2-incremental-cache.js" ;
2827import {
2928 CACHE_DIR as STATIC_ASSETS_CACHE_DIR ,
3029 NAME as STATIC_ASSETS_CACHE_NAME ,
3130} from "../../api/overrides/incremental-cache/static-assets-incremental-cache.js" ;
31+ import { computeCacheKey } from "../../api/overrides/internal.js" ;
3232import {
3333 BINDING_NAME as D1_TAG_BINDING_NAME ,
3434 NAME as D1_TAG_NAME ,
@@ -113,8 +113,8 @@ function populateR2IncrementalCache(
113113 const assets = getCacheAssets ( options ) ;
114114
115115 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 ] ,
118118 buildId,
119119 isFetch,
120120 } ) ;
@@ -146,7 +146,8 @@ function populateKVIncrementalCache(
146146 const assets = getCacheAssets ( options ) ;
147147
148148 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 ] ,
150151 buildId,
151152 isFetch,
152153 } ) ;
0 commit comments