...
Info |
---|
return(pass) passes the request to the backend |
By Cookie
/etc/varnish/default.vcl
Code Block |
---|
sub vcl_recv {
if (req.http.Cookie ~ "LOGGED-IN=1") {
return(pass)
}
}
|
Info |
---|
bypasses cache if there is a LOGGED-IN cookie with value 1 |
By Header
/etc/varnish/default.vcl
Code Block |
---|
sub vcl_recv {
if (req.http.X-Requested-With == "XMLHttpRequest") {
return(pass)
}
}
|
Info |
---|
ajax requests bypass cache |
Caching strategies; you can set, and flush now for real world scenarios
Bomb proof static delivery: fullasagoog.com
...