Skip to content

Commit

Permalink
fix: enable cache only for clientDb (#2425)
Browse files Browse the repository at this point in the history
Co-authored-by: Farnabaz <farnabaz@gmail.com>
  • Loading branch information
Barbapapazes and farnabaz committed Dec 12, 2023
1 parent 1ce6953 commit f76ed94
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,13 @@ export interface ModuleOptions {
clientDB?: boolean
stripQueryParameters?: boolean
advanceQuery?: boolean,

/**
* Control content cach generation.
*
* This option might be removed in the next major version.
*/
cacheContents?: boolean
/**
* Search mode.
*
Expand Down Expand Up @@ -353,6 +360,7 @@ export default defineNuxtModule<ModuleOptions>({
respectPathCase: false,
experimental: {
clientDB: false,
cacheContents: true,
stripQueryParameters: false,
advanceQuery: false,
search: undefined
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/server/api/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default defineEventHandler(async (event) => {
return {
generatedAt: now,
generateTime: Date.now() - now,
contents,
contents: content.experimental.cacheContents ? contents : [] as any,
navigation
}
})

0 comments on commit f76ed94

Please sign in to comment.