Skip to content

Commit 5d1c796

Browse files
author
Oleksandr Gorkun
committed
MAGETWO-83152: [github] Pages are cached in browser and not updated
1 parent 6cda42a commit 5d1c796

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ sub vcl_deliver {
189189
}
190190

191191
# Not letting browser to cache non-static files.
192-
if (req.url !~ "^/(pub/)?(media|static)/") {
192+
if (resp.http.Cache-Control !~ "private" && req.url !~ "^/(pub/)?(media|static)/") {
193193
set resp.http.Pragma = "no-cache";
194194
set resp.http.Expires = "-1";
195195
set resp.http.Cache-Control = "no-store, no-cache, must-revalidate, max-age=0";

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ sub vcl_deliver {
190190
}
191191

192192
# Not letting browser to cache non-static files.
193-
if (req.url !~ "^/(pub/)?(media|static)/") {
193+
if (resp.http.Cache-Control !~ "private" && req.url !~ "^/(pub/)?(media|static)/") {
194194
set resp.http.Pragma = "no-cache";
195195
set resp.http.Expires = "-1";
196196
set resp.http.Cache-Control = "no-store, no-cache, must-revalidate, max-age=0";

0 commit comments

Comments
 (0)