6

I have been asked to work on an existing magento store which currently has 2 vital parts:

  1. Full Page Cache - To help reduce the load time of the site and server load a full page cache was installed. This made a dramatic increase in performance.

  2. Always show up to date Products - the store will have a constant stream of new products and categories added to it - in the region of say 10-20 every hour. The product listing pages must always show the very latest and all products

At the moment the store is showing fast cached versions of the product listing pages but they are obviously not the very latest version showing all new products. The only way to show the very latest version is to flush the cache

Am i correct in thinking there is no way of having these 2 parts working together? By caching the page for speed I will always show a previous/out of date page? The only way to show the latest version is to not cache the pages?

2

Don't forget that you're dealing with cache invalidation, one of the two hardest things in computer science.

You have two choices: hole punch / asynchronous call to retrieve the listings, or scheduled flush of the product listing cache entries. If the import is automated, I'd recommend to properly tag cache entries which will allow you to flush & then warm the cache upon import. It seems much more advisable to spinning up the app to serve a hole punch or async request.

2

Your problem is simple and the solution is easy; but you are trying to solve the wrong problem. Get rid of the cache, address the underlying performance issues.

Magento can, and will, deliver 0.5s page load times with all caches off. If you aren't seeing page load times at or under 0.5s with all your caches off - then you need to do two things.

  1. Check your code
  2. Check your hosting

You can confirm which is at fault by installing a Magento demo store with sample data. If it loads in under 0.5s with all the caches off - then it rules out your hosting, if not, you need to change to a decent specialist hosting provider.


If the demo store is quick, then you can turn your attention back to your own store and focus on code profiling.

Don't waste your time trying to warm a cache, it's a waste of time and resources, and your store will still never be quick.

Caches don't make sites quick, they reduce hardware utilisation for repeated requests

If you focus on a strategy of caching for performance, you'll hurt the customers that matter most; those logged in and those trying to checkout - because a cache won't do anything for unique sessions.

Once you solve your uncached speed, you'll no longer have another issue to solve.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.