File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed
Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -25,16 +25,18 @@ export default defineNuxtModule({
2525 token : config . upstash . redisRestToken ,
2626 }
2727
28- // Main cache storage (for defineCachedFunction, etc.)
29- nitroConfig . storage . cache = {
30- ...nitroConfig . storage . cache ,
31- driver : 'vercel-runtime-cache' ,
32- }
33-
34- // Fetch cache storage (for SWR fetch caching)
35- nitroConfig . storage [ FETCH_CACHE_STORAGE_BASE ] = {
36- ...nitroConfig . storage [ FETCH_CACHE_STORAGE_BASE ] ,
37- driver : 'vercel-runtime-cache' ,
28+ if ( process . env . RUNTIME_CACHE ) {
29+ // Main cache storage (for defineCachedFunction, etc.)
30+ nitroConfig . storage . cache = {
31+ ...nitroConfig . storage . cache ,
32+ driver : 'vercel-runtime-cache' ,
33+ }
34+
35+ // Fetch cache storage (for SWR fetch caching)
36+ nitroConfig . storage [ FETCH_CACHE_STORAGE_BASE ] = {
37+ ...nitroConfig . storage [ FETCH_CACHE_STORAGE_BASE ] ,
38+ driver : 'vercel-runtime-cache' ,
39+ }
3840 }
3941
4042 const env = process . env . VERCEL_ENV
You can’t perform that action at this time.
0 commit comments