Skip to content

Commit f578e54

Browse files
author
He, Joan(johe)
committed
Merge pull request #91 from magento-extensibility/MAGETWO-44448-varnish-bottle-neck
[Extensibility] Magetwo 44448 varnish bottle neck
2 parents fc7a956 + 9d93e76 commit f578e54

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

app/code/Magento/PageCache/etc/varnish3.vcl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,12 @@ sub vcl_recv {
4646
if (req.request != "GET" && req.request != "HEAD") {
4747
return (pass);
4848
}
49-
49+
50+
# Bypass shopping cart and checkout requests
51+
if (req.url ~ "/checkout") {
52+
return (pass);
53+
}
54+
5055
# normalize url in case of leading HTTP scheme and domain
5156
set req.url = regsub(req.url, "^http[s]?://", "");
5257

app/code/Magento/PageCache/etc/varnish4.vcl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ sub vcl_recv {
4040
return (pass);
4141
}
4242

43+
# Bypass shopping cart and checkout requests
44+
if (req.url ~ "/checkout") {
45+
return (pass);
46+
}
47+
4348
# normalize url in case of leading HTTP scheme and domain
4449
set req.url = regsub(req.url, "^http[s]?://", "");
4550

0 commit comments

Comments
 (0)