File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
packages/nextjs-cache-handler Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 10
10
"type" : " git" ,
11
11
"url" : " git+https://github.com/fortedigital/nextjs-cache-handler.git"
12
12
},
13
- "version" : " 1.1.0 " ,
13
+ "version" : " 1.1.1 " ,
14
14
"type" : " module" ,
15
15
"license" : " MIT" ,
16
16
"description" : " Next.js cache handlers" ,
Original file line number Diff line number Diff line change @@ -19,7 +19,11 @@ export default function bufferStringDecorator(handler: Handler): Handler {
19
19
const hit = await handler . get ( key , ctx ) ;
20
20
const staticPageCacheData =
21
21
hit ?. value as unknown as ConvertedStaticPageCacheData ;
22
- if ( hit ?. value && staticPageCacheData ?. body ) {
22
+ if (
23
+ hit ?. value &&
24
+ ( staticPageCacheData ?. kind as string ) === "APP_ROUTE" &&
25
+ staticPageCacheData ?. body
26
+ ) {
23
27
return {
24
28
...hit ,
25
29
value : {
@@ -32,8 +36,8 @@ export default function bufferStringDecorator(handler: Handler): Handler {
32
36
} ,
33
37
34
38
async set ( key , data ) {
35
- const routeValue = data . value as CachedRouteValue ;
36
- if ( routeValue ?. kind === "ROUTE " && routeValue ?. body ) {
39
+ const routeValue = data . value as unknown as CachedRouteValue ;
40
+ if ( ( routeValue ?. kind as string ) === "APP_ROUTE " && routeValue ?. body ) {
37
41
await handler . set ( key , {
38
42
...data ,
39
43
value : {
You can’t perform that action at this time.
0 commit comments