From 4cef2b84556bc7371c4fad78f4cd3d55618499f2 Mon Sep 17 00:00:00 2001 From: Mauricio Wyler Date: Wed, 22 May 2019 23:39:03 -0300 Subject: [PATCH] FIX: wc cache fix --- global/server/fastcgi-cache.conf | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/global/server/fastcgi-cache.conf b/global/server/fastcgi-cache.conf index 14d0d7f..fc62848 100644 --- a/global/server/fastcgi-cache.conf +++ b/global/server/fastcgi-cache.conf @@ -32,3 +32,13 @@ if ($request_uri ~* "/wp-admin/|/wp-json/|/xmlrpc.php|wp-.*.php|/feed/|index.php if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in") { set $skip_cache 1; } + +# Skip cache on WooCommerce pages (no contempla urls con localización) +if ($request_uri ~* "/store.*|/carrito.*|/mi-cuenta.*|/cart.*|/my-account.*|/checkout.*|/addons.*") { + set $skip_cache 1; +} + +# Skip cache for WooCommerce query string +if ( $arg_add-to-cart != "" ) { + set $skip_cache 1; +} \ No newline at end of file