Page MenuHomePhabricator

cache-text-misc.vcl

Authored By
ema
Jun 1 2018, 1:19 PM
Size
615 B
Referenced Files
None
Subscribers
None

cache-text-misc.vcl

// somewhere in modules/varnish/files/reload-vcl
// vcl.load vcl_misc /somewhere/cache-misc.vcl
// vcl.label cache_misc_label vcl_misc
// cache-text.vcl
sub vcl_init {
new hostmatch = re2.set(anchor=both, case_sensitive=false, literal=true);
hostmatch.add("15.wikipedia.org");
hostmatch.add("analytics.wikimedia.org");
hostmatch.add("annual.wikimedia.org");
// [...]
hostmatch.compile();
}
sub vcl_recv {
if (hostmatch.match(req.http.Host)) {
// cache_misc
return (vcl(cache_misc_label));
}
// regular cache_text vcl here
}

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5859348
Default Alt Text
cache-text-misc.vcl (615 B)

Event Timeline