Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F18650647
cache-text-misc.vcl
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
ema
Jun 1 2018, 1:19 PM
2018-06-01 13:19:05 (UTC+0)
Size
615 B
Referenced Files
None
Subscribers
None
cache-text-misc.vcl
View Options
// 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
Details
Attached
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)
Attached To
Mode
P7201 cache-text-misc.vcl
Attached
Detach File
Event Timeline
Log In to Comment