As discussed e.g. in this thread, aggressive caching by reverse-proxies can sometimes lead to hard-to-debug issues.
Apparently, there’s a fairly widespread practice of adding a content-hash to Javascript filenames, known as “cache busting”. Apparently Deno Fresh does this, and esbuild can also be configured to do this.
I tried doing this for silverbullet (v2), by adding entryNames: "[name].[hash]"
everywhere esbuild.build
is called. However, this section tries to modify a file with a now-invalid filename, and there are probably other places like this. This section is already seemingly discussing something called CACHE_NAME
, but the commit that introduces it is too large to easily reason about what exactly that’s doing.
Does this seem like a useful, and feasible, thing to add?