From a11247bf228defdf9891a93b667852710e177902 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCrg=C3=BCn=20Day=C4=B1o=C4=9Flu?= Date: Sat, 3 Feb 2024 11:16:27 +0100 Subject: [PATCH] more docs --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2d0356b..7940c20 100644 --- a/README.md +++ b/README.md @@ -200,7 +200,7 @@ Default: `undefined` To enable `hash`, the `wildcard` option must first be disabled explicitly. When enabled, `hash` lets the user access assets dynamically using the decorated `getHashedAsset` function. This in turn makes possible the usage of a very high `maxAge` so that the content can be cached as long as possible. If any modifications are made to a file, its hash will simply be recalculated during the next startup and the cache will bust for that asset. -**Note:** A custom script can be used to generate the hashes in advance, ideally during the build phase. +**Note:** A custom script can be used to generate the hashes in advance to speed up cold start times, ideally during the build phase. ##### Example: @@ -260,6 +260,8 @@ async function run () { run() ``` +The hashes are created in the following directory: `.tmp/hashes.json`. + #### `allowedPath` Default: `(pathName, root, request) => true`