Purging cached std.fileread() contents
Justin Lloyd
justinl at arena.net
Thu Jun 15 16:57:46 UTC 2023
I'm trying to test a simple Varnish setup with no backend to serve a single index.html file. This is for use on a maintenance page web server when the main web site is down, more specifically, behind an AWS ALB with two target groups, one with the main web servers and the other with two lightweight maintenance page servers. I figured that it'd be nice to just leave out a Nginx configuration since a single static file is all that's needed (images referenced in the HTML are from other sources).
I'm using std.fileread("/var/www/html/index.html") to set the resp.body. The documentation for std.fileread() says it is cached indefinitely, so how do I get Varnish to re-read the file when it gets updated without having to restart Varnish? The reason for this is that the maintenance page lists the ETA when the web site should be back up, so if I need to extend the maintenance, I have a manual script that creates and deploys a new version of the file to the maintenance page servers.
Justin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20230615/7b2a1ae7/attachment.html>
More information about the varnish-misc
mailing list