Thanks Andreas, just realized that the backend server sets "Age: 0", this might the reason why Varnish didn't cache 404 page.
By the way, if Varnish will cache 404 by default, what is the default TTL for this? Is there a way to set a custom TTL for 404 caching? On Fri, Apr 13, 2012 at 7:33 PM, Andreas Plesner Jacobsen <[email protected]> wrote: > On Fri, Apr 13, 2012 at 07:13:42PM +0800, Kelvin Loke wrote: > >> I am not sure if this is workable, is these a way for Varnish to cache 404 >> page? > > Varnish will do so by default. If it doesn't, it's because you have VCL or > backend headers (Expires or Cache-Control) preventing the caching. > > -- > Andreas > > _______________________________________________ > varnish-misc mailing list > [email protected] > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc _______________________________________________ varnish-misc mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
