Purging cached std.fileread() contents

Guillaume Quintard guillaume.quintard at gmail.com
Thu Jun 15 17:52:22 UTC 2023


Piling on here, there's also one in rust!
https://github.com/gquintard/vmod_fileserver

On Thu, Jun 15, 2023, 19:44 Geoff Simmons <geoff at uplex.de> wrote:

> On 6/15/23 18:57, Justin Lloyd wrote:
> >
> > 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?
>
> "Cached indefinitely" means just what it says. The VMOD saves the file
> contents in memory on the first invocation of std.fileread(), and never
> reads the file again.
>
> We have a VMOD that reads file contents and then monitors the file for
> changes. The new contents are used after the change:
>
> https://code.uplex.de/uplex-varnish/libvmod-file
>
>
> Best,
> Geoff
> --
> ** * * UPLEX - Nils Goroll Systemoptimierung
>
> Scheffelstraße 32
> 22301 Hamburg
>
> Tel +49 40 2880 5731
> Mob +49 176 636 90917
> Fax +49 40 42949753
>
> http://uplex.de
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20230615/59390573/attachment-0001.html>


More information about the varnish-misc mailing list