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

Élodie BOSSIER elodieuse at gmail.com
Thu Apr 5 22:03:29 UTC 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 vinyl-misc mailing list