Skip to content

Commit

Permalink
fix: db access time issue (#1838)
Browse files Browse the repository at this point in the history
  • Loading branch information
Barbapapazes committed Feb 21, 2023
1 parent 1a8a3d3 commit 20d8288
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/runtime/server/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,13 @@ export const getContent = async (event: H3Event, id: string): Promise<ParsedCont
}

const meta = await sourceStorage.getMeta(id)
const mtime = meta.mtime
const size = meta.size || 0
const hash = ohash({
meta,
// Last modified time
mtime,
// File size
size,
// Add Content version to the hash, to revalidate the cache on content update
version: contentConfig.cacheVersion,
integrity: contentConfig.cacheIntegrity
Expand Down

0 comments on commit 20d8288

Please sign in to comment.