From: Kirill A. Korinsky Subject: Re: httpd: add cache controls for static files To: job@bsd.nl, tech@openbsd.org Date: Mon, 11 May 2026 11:40:09 +0200 On Mon, 11 May 2026 11:36:12 +0200, Kirill A. Korinsky wrote: > > On Mon, 11 May 2026 10:52:05 +0200, > Job Snijders wrote: > > > > On Sun, May 10, 2026 at 01:39:20PM +0200, Kirill A. Korinsky wrote: > > > On Tue, 05 May 2026 21:58:01 +0200, > > > Kirill A. Korinsky wrote: > > > > > > > > I'd like to teach httpd to advertise static file revalidation by default > > > > with Cache-Control: no-cache, preserving the existing Last-Modified and > > > > If-Modified-Since flow; add a [no] cache directive for opting out, and > > > > advertise Vary: Accept-Encoding whenever gzip-static is enabled. > > > > > > > > > > This is new version which is rebased upon inherit gzip-static in locations > > > fix. It widen server flags to 64-bit integers because the 32-bit flag space > > > has no room for the cache/no-cache pair. > > > > > > Ok? > > > > I'd like to use the functionality, but I found this somewhat counter-intuitive: > > > > "cache" config directive results in sending "Cache-Control: no-cache" header > > "no cache" config directive results in sending "" header > > > > Can we come up with something better on the httpd.conf side? > > > > What do you think about [no] revalidate or [no] validation? > > Frankly, [no] cache was simplest way, and I have no better namig. > Probably [no] static-cache-control is the clearest way. -- wbr, Kirill