Skip to content

Commit

Permalink
fix: fix next params
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasio committed Jan 16, 2025
1 parent 54cdb81 commit ac296cc
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/next-redis-cache-provider/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export default class RedisCache implements CacheHandler {
}

private buildKey(key: string) {
if (this.ctx._appDir) {
if (typeof this.BUILD_ID === 'undefined') {
return key;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/next/src/rsc/data/queries/prepareQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function prepareQuery<P extends EndpointParams>(

const options = merge<NextQueryProps<P>['options']>([
{
cache: 'no-store',
cache: typeof rest.options?.next?.revalidate === 'undefined' ? 'no-store' : undefined,
},
rest.options ?? {},
]);
Expand Down
1 change: 1 addition & 0 deletions projects/wp-nextjs-app/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ if (process.env.NEXT_REDIS_URL || process.env.VIP_REDIS_PRIMARY) {
initRedisClient();

nextConfig.cacheHandler = require.resolve('@10up/next-redis-cache-provider');
nextConfig.cacheMaxMemorySize = 0;
}

module.exports = withHeadstartWPConfig(nextConfig);
1 change: 0 additions & 1 deletion projects/wp-nextjs-app/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ async function query({ params }: HeadstartWPRoute) {
postType: 'page',
},
options: {
cache: 'force-cache',
next: {
revalidate: 60,
tags: ['home'],
Expand Down

0 comments on commit ac296cc

Please sign in to comment.