<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
font-family:"Calibri",sans-serif;
mso-ligatures:none;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Thank you both for the responses. However, I have a strong aversion to using miscellaneous 3<sup>rd</sup> party unsupported software, especially for something so relatively trivial, and something that has to be compiled and monitored for
updates, that I’d think would be a native feature. It seems like it’d just be simpler to stick with a basic Nginx backend. (That said, I’ve actually been developing an alternate design from ec2 instances to a Lambda, but that has its own set of complexities,
even for something as simple as a single, static maintenance page.)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Justin<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> varnish-misc <varnish-misc-bounces+justinl=arena.net@varnish-cache.org>
<b>On Behalf Of </b>Guillaume Quintard<br>
<b>Sent:</b> Thursday, June 15, 2023 10:52 AM<br>
<b>To:</b> Geoffrey Simmons <geoff@uplex.de><br>
<b>Cc:</b> varnish-misc@varnish-cache.org<br>
<b>Subject:</b> Re: Purging cached std.fileread() contents<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Piling on here, there's also one in rust!<o:p></o:p></p>
<div>
<p class="MsoNormal"><a href="https://github.com/gquintard/vmod_fileserver">https://github.com/gquintard/vmod_fileserver</a><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Thu, Jun 15, 2023, 19:44 Geoff Simmons <<a href="mailto:geoff@uplex.de">geoff@uplex.de</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<p class="MsoNormal">On 6/15/23 18:57, Justin Lloyd wrote:<br>
> <br>
> The documentation for std.fileread() says it is cached indefinitely, so <br>
> how do I get Varnish to re-read the file when it gets updated without <br>
> having to restart Varnish?<br>
<br>
"Cached indefinitely" means just what it says. The VMOD saves the file <br>
contents in memory on the first invocation of std.fileread(), and never <br>
reads the file again.<br>
<br>
We have a VMOD that reads file contents and then monitors the file for <br>
changes. The new contents are used after the change:<br>
<br>
<a href="https://code.uplex.de/uplex-varnish/libvmod-file" target="_blank">https://code.uplex.de/uplex-varnish/libvmod-file</a><br>
<br>
<br>
Best,<br>
Geoff<br>
-- <br>
** * * UPLEX - Nils Goroll Systemoptimierung<br>
<br>
Scheffelstraße 32<br>
22301 Hamburg<br>
<br>
Tel +49 40 2880 5731<br>
Mob +49 176 636 90917<br>
Fax +49 40 42949753<br>
<br>
<a href="http://uplex.de/" target="_blank">http://uplex.de</a><br>
<br>
_______________________________________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org" target="_blank">varnish-misc@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</body>
</html>