Redis and WooCommerce cache issues

Hello I started using Easy Engine and made and made a single install with redis cache for a WooCommerce shop. I am having issues with redis caching woo pages. How can i do to make it not cache thoose pages.

I’ve seen this thread here but I am not sure it is still the right thing.

Can you tell me step by step what I need to do. I am not that technical.

Thanks in advance

Hi there!

You could try the following to solve the caching issue:
Please add a new file in the following path on your server:

/var/www/yourwoocommerce-shop-domain.com/conf/nginx/

name the new file like so:

woo.conf

now open this file with a code editor of your choice (i.e. sublime text is awesome) and insert the following code:

if ( $cookie_woocommerce_items_in_cart = "1" ){
    
 set $skip_cache 1; 
}
# Don't cache uris containing the following segments
if ($request_uri ~* "(/shop.*|/cart.*|/my-account.*|/checkout.*|/addons.*|/wp-admin/|/warenkorb/|/kasse/|/xmlrpc.php|wp-.*.php|/feed/|index.php|sitemap(_index)?.xml|[a-z0-9_-]+-sitemap([0-9]+)?.xml)") {

    		set $skip_cache 1;
}

If your shop’s permalinks are non-english or german language slugs, then you should add the slugs in your shop’s language to the code above.

Once you saved the new woo.conf with above code in it, you need to restart your nginx like so via SSH terminal command:

service nginx restart

If you need any help, please let me know!

Saskia