From c78d7f0efa587e80f815dc5cdf143a6168a962a4 Mon Sep 17 00:00:00 2001 From: Harlan Wilton Date: Fri, 16 Dec 2022 14:43:52 +1100 Subject: [PATCH] fix: hash for route name, allow caching --- src/module.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/module.ts b/src/module.ts index 5020108a..0e7abcee 100644 --- a/src/module.ts +++ b/src/module.ts @@ -162,7 +162,7 @@ declare module 'nitropack' { // check if the route path is not for a file const screenshotPath = ctx._contents.match(new RegExp(``))?.[1] - const fileName = `${hash({ route: ctx.route, time: Date.now() })}.png` + const fileName = `${hash({ route: ctx.route })}.png` const absoluteUrl = withBase(`${config.outputDir}/${fileName}`, config.host) const entry: OgImageRouteEntry = { fileName,