pragma no-cache HTML only with beresp.http.Pragma ?

Élodie BOSSIER elodieuse at gmail.com
Fri Apr 6 00:03:29 CEST 2012


Greetings,

I would like take in consideration the cache information from a HTML 
page only, example this :

<html>
<head>
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
</head>
<body>
Hello world !
</body>
</html>

And this is a part of my default.vcl (only a debug part) :

sub vcl_fetch
   {
   if ( beresp.http.Pragma ~ "no-cache" )
     {
     set beresp.http.X-Cacheable = "found no-cache !";
     return(hit_for_pass);
     }

But it's don't work, it seem Varnish see only a header information (sent 
by PHP exemple), but nothing from a HTML page only.

Do you have an idea to take in consideration the HTML <head> with 
Varnish 3.0 please ?

Thanks so much,
Elodie.



More information about the varnish-misc mailing list