Configuration issues with Redis

We are using Cloudflare with our Magento 2.4 e-commerce website (Wordpress blog too) on a cloud server.

Unfortunately, when some customers create accounts they see profile information of previous registrants on certain account screens.

According to the hosting service Nexcess, there seems to be an issue between Cloudflare and Redis cache.

Has anyone else experienced this? Is there a setting that resolves these types of issues?

Thanks for any insight.

I notice you’re using APO, and it looks like you’re using it in a subdirectory, rather than a subdomain. This leads me to believe that APO is caching your Magento pages. And I bet that’s it:

2 Likes

I don’t see any place to configure APO so it only caches WP pages

Haven’t tried it myself, but you should be able to use CF page rules to override APO cache for your magento subdirectory. Not ideal though as without CF caching Magento would definitely be more server resource intensive than Wordpress.

But isn’t the APO only supposed to be for WP? Different than CF cache?

Our site has both Magento and WP and the APO seems to be causing issues with incorrect customer data display

Bill Ferris
773.383.9645 | [email protected]

CF Wordpress APO operates either on apex domain, subdomain or subdirectory basis in conjunction with CF Wordpress plugin which tells what to cache/purge/manage Wordpress wise AFAIK and not web app basis. @yevgen I believe in future CF has plans for APO for other web apps? Maybe Magento might be one of those?

So if you setup WP APO on apex main domain, then domain.com/* all would be subject to APO unless you use page rules to exclude https://developers.cloudflare.com/automatic-platform-optimization/reference/page-rule-integration

Also see https://developers.cloudflare.com/automatic-platform-optimization/reference/subdomain-subdirectories. So in your instance you’d need to use page rules to exclude Magento subdirectory or move Magento to a subdomain or don’t use WP APO and use CF Cache page rules to manage apex domain Wordpress and Magento subdirectory separately or write your own CF Worker based caching to handle both Wordpress and Magento in a more fine grained manner.

1 Like