8351e67c

By: Michael Lynch <git@mtlynch.io>

Add ETag caching and Cache-Control headers for static assets

Wrap the static file server with middleware that sets a Cache-Control
header (public, max-age=1800) and generates per-process ETag values
based on a SHA-256 hash of the startup timestamp and request path.
When the client sends a matching If-None-Match header, the server
responds with 304 Not Modified and an empty body.

Co-authored-by: Shelley <shelley@exe.dev>

Suite timing

Time to Start Worker time Duration Time to finish
Config 19s 1s 1s 21s
Eval 4m03s 32s 32s 4m36s
Build 22m56s 3m48s 2m19s 25m16s
Test - - - -
Deploy - - - -
Suite 19s 4m22s 24m56s 25m16s

Timeline

0s20s4m20s23m23m20s23m40s24m24m20s24m40s25m