File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
app/code/Magento/PageCache/etc Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,8 @@ sub vcl_recv {
49
49
return (pass );
50
50
}
51
51
52
- # Bypass shopping cart and checkout requests
53
- if (req.url ~ " /checkout" ) {
52
+ # Bypass shopping cart, checkout and search requests
53
+ if (req.url ~ " /checkout" || req.url ~ " /catalogsearch " ) {
54
54
return (pass );
55
55
}
56
56
Original file line number Diff line number Diff line change @@ -137,13 +137,11 @@ sub vcl_backend_response {
137
137
}
138
138
}
139
139
140
- #If page is not cacheable then bypass varnish for 2 minutes as Hit-For-Pass
140
+ # If page is not cacheable then bypass varnish for 2 minutes as Hit-For-Pass
141
141
if (beresp.ttl <= 0s ||
142
142
beresp.http.Surrogate-control ~ " no-store" ||
143
143
(!beresp.http.Surrogate-Control && beresp.http.Vary == " *" )) {
144
- /*
145
- * Mark as "Hit-For-Pass" for the next 2 minutes
146
- */
144
+ # Mark as Hit-For-Pass for the next 2 minutes
147
145
set beresp.ttl = 120s ;
148
146
set beresp.uncacheable = true ;
149
147
}
You can’t perform that action at this time.
0 commit comments