Webinoly is just the perfect tool for NGINX experts. Give it a try!
0 votes
1.1k views
by Rookie

Hi! I just moved from Easy Engine and I'm loving Webinoly so far, though I'm having an issue with the Easy Digital Downloads checkout being cached.

I can't seem to skip the cache on checkout. The products stay there for everyone across everything.

It's also worth mentions I'm properly a noob at Nginx

Here's what I've added to to my custom-nginx.conf under /var/www/mydomain.com

if ($request_uri ~* "/cart.*/|/my-account.*|/checkout.*|/purchase-confirmation.*|/edd-sl.*|/login/") {         

set $skip_cache 1;

}

if ($http_cookie ~* “ edd_items_in_cart |comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in”) {

set $skip_cache 1;

}

When I access /checkout/ while viewing the logs, it states bypass which is expected? Though it still displays the cached products.

I also need the /edd-sl.* (for software licensing) not to be cached. I haven't checked this out yet.

I'm also securing EDD downloads with this:

rewrite ^/wp-content/uploads/edd/(.*)\.zip$ / permanent;

is $skip_cache being used before my custom config? or am I missing something?
I'm keeping cache off for now. Any point in the right direction or tips would be highly appreciated! Thank you!

Bonus

For those who's using The SEO Framework line me. I noticed the sitemap couldn't be accessed. I found this code which works well from my custom config.

## sitemap location = /sitemap.xml { rewrite ^/sitemap.xml$ "/?the_seo_framework_sitemap=xml" permanent; }

1 Answer

0 votes
by Expert

Hi Morgan,

I've never used EDD, so I don't really know what exactly you need to bypass the cache. What I can suggest is that you can see the rules we use for WooCommerce, please check the /etc/nginx/common/wpfc.conf file.

Also, remember that Webinoly has native support for Yoast Sitemap, you can enable/disable this feature whenever you want, just be careful to not have a conflict with your custom sitemap rules.

Regards.

by Rookie

I've been test this every way I know how and modified the /etc/nginx/common/wpfc.conf  with the same result. 

It still states 'bypassed' as expected, so it must be being cached somewhere else. Could Redis be caching the cart separately? 

The Yoast Sitemap settings in Webinoly seems to have no no affect on the SEO Framework sitemap. It's a fast growing SEO plugin, it would be cool if you'd consider supporting it by default :) 

Thank you for your time.

by Rookie

I just noticed this in my WordFence logs, when I clear the cart from multiple browsers. 

left https://mydomain.com/checkout/?edd_remove_from_cart_nonce=17dfa1287b and was redirected when visiting https://mydomain.com/checkout/?edd_remove_from_cart_nonce=c5634013e1

When cache is enabled it redirects all browsers to use the same nonce (c5634013e1), which is why the cart appears to work like a 'global cart'.

Let me know if you have any pointers for dealing with nonces when it comes to cache config. 

Thanks!

by Expert
Did you already try with Redis disabled?
by Talented

If you are using SEO Framework you definitely want to use...

sudo webinoly -yoast-sitemap=off

by Talented
Agreed. The Yoast sitemap is a kludge from way back when god was a boy, and should have been kicked into touch a long time ago.
by Expert

This is an old thread, but just for the record:

Redirects are cached by FastCGI, so it may be the cause for the "nonces" issues described above. You can manually adjust FastCGI in Webinoly using the -config-cache option.

Welcome to the Community site for Webinoly.

Our Optimized LEMP Web Server is a powerful set of commands for doing just about anything you could wish.

With Webinoly you can set up your NGINX web server in just one step.

* * * * * * *

To report a bug, please create a new issue on GitHub or ask a question here with the bug tag.
Webinoly Support Paypal Donations

PayPal · GitHub Sponsors · Bitcoin

It is very important that any visitor to the site read the disclaimer, terms of use and privacy and legal statement before start browsing.

...