Skip to content

Commit 3c3d1bf

Browse files
committed
Ensure cache handler is used in dev mode
1 parent d266800 commit 3c3d1bf

File tree

3 files changed

+2
-13
lines changed

3 files changed

+2
-13
lines changed

examples/redis-minimal/cache-handler.mjs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,6 @@ CacheHandler.onCreation(() => {
9797
}
9898
}
9999

100-
if (process.env.NODE_ENV === "development") {
101-
const config = { handlers: [createLruHandler()] };
102-
if (isSingleConnectionModeEnabled) {
103-
global.cacheHandlerConfig = config;
104-
}
105-
return config;
106-
}
107-
108100
const promise = createCacheConfig();
109101
if (isSingleConnectionModeEnabled) {
110102
global.cacheHandlerConfigPromise = promise;

examples/redis-minimal/next.config.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
import type { NextConfig } from "next";
22

33
const nextConfig: NextConfig = {
4-
cacheHandler:
5-
process.env.NODE_ENV === "production"
6-
? require.resolve("./cache-handler.mjs")
7-
: undefined,
4+
cacheHandler: require.resolve("./cache-handler.mjs"),
85
cacheMaxMemorySize: 0, // disable default in-memory caching
96
experimental: {
107
//ppr: "incremental",

examples/redis-minimal/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"moduleResolution": "bundler",
1616
"resolveJsonModule": true,
1717
"isolatedModules": true,
18-
"jsx": "react-jsx",
18+
"jsx": "preserve",
1919
"incremental": true,
2020
"plugins": [
2121
{

0 commit comments

Comments
 (0)