Problem/Motivation
Using current default.vcl configuration proided with this module, those files (woff2, svg & webp) won't be cached by Varnish.
Steps to reproduce
Observing the HTTP header of webp, svg or woff2 files you will see x-varnish-cache: MISS
Proposed resolution
Update provided default.vcl file.
Issue fork adv_varnish-3241704
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
tostinni commentedSwitch to need review.
Comment #4
shumer commentedComment #6
arnaud-brugnon commentedI am sorry to say that but the fix is not complete.
As the default.vcl comments, modifications in line 125 must be in line 224 too
Otherwise, svg elements will be not be cached (Debugging since few hours ...)
So
if (bereq.url ~ "(?i)\.(jpeg|jpg|png|gif|ico|swf|js|css|txt|eot|woff|ttf|htc|mp3|m4a|mp4|m4v|mov|mpeg|mpg|avi|divx|ogg|ogv|wma|pdf|tar|gz|gzip|bz2|asc|dat|doc|xls|ppt|tgz|csv)(\?.*|)$") {
unset beresp.http.set-cookie;
return(deliver);
}
Shoud containts new formats
Comment #7
arnaud-brugnon commentedIt may be a good idea to set variables to thoses list to prevent duplicate errors
Comment #8
arnaud-brugnon commentedOr maybe we can do like Search API module.
Make default.vcl downloadable in back office
Comment #9
shumer commentedComment #11
shumer commented