Jump to content
thirty bees forum

Full Page Caching for Thirty Bees


Bull

Recommended Posts

Full page cache works, to some extent.

Problem with this kind of caches is that... well they will never work reliably with thirtybees/prestashop system, because there is no way to detect when something changed and flush the cache. Which means that your store will, ultimately, display stale information.

For many merchants this is acceptable. But you must be OK with stuff like

  • your customer entering new product review, and then this review not being displayed for couple of hours
  • you change product price, and it correctly changes on product page, but not in category listing
  • ...

Note that you would experience these issues with tb native FPC, and with any other similar solution. As I said, there is no way to notify caching layer to flush the cache when content changes.

In my experience thirty bees is pretty fast, and you can usually work very well without FPC. If your server is slow, there is probably some reason behind that -- badly written module, bad server, etc.

Link to comment
Share on other sites

Well, a cache should only be flushed when strictly necessary - otherwise what's the point. There should be ways to "automate" it, for example flushing the productpage when the stock status changes.

But i hear you are saying the TB FPC is working as it should?

Link to comment
Share on other sites

FPC don't know what is displayed on the page. For example, if you install my product comments module, reviews will be part of product page. When new review is submitted, new row is stored in database table. But thirty bees FPC (or any other caching module) don't know what that mean. Thirty bees have no idea on which pages this record is displayed -- in this case, it's a product detail page, category listing, home page, review list page, possibly blog posts, etc... All these pages will show outdated information (new review will not be there). 

The worst situation will be on product page itself, because the customer will not see the review he just submitted. He might thing that something went wrong, and submit it again. And again.... And all these duplicate reviews will be eventually displayed, once the cached version is flushed...

This is just one example. There are hundreds of modules (and core features as well) that can be negatively impacted by FPC. You can try to mitigate this impact by setting FPC dynamic hooks, but... some problems will still happen.

If your pages are mostly static, then go ahead, use FPC. If you use a lot of modules, I recommend not to use any FPC. You would shoot yourself to the foot. 

But yeah, FPC is working correctly. It is working as designed, although design is seriously flawed 🙂

Link to comment
Share on other sites

1 hour ago, Bull said:

a cache should only be flushed when strictly necessary

That's pretty much on every page load. Even when visitors just look around, sections like "recently visited" changes on about every click.

Don't believe it? How about a look from the opposite direction, an e-commerce solution for Hugo, a static(!) web page generator: https://snipcart.com/blog/hugo-tutorial-static-site-ecommerce Essentially they use their static pages just as a placeholder for a dynamic e-commerce solution just like PrestaShop/thirty bees/Merchant's Edition.

Third, page caching can apply to the initial HTML page load, only. And that's less than a second on a decent hosting already, so there's simply nothing which could be taken away by caching. All other time spent until the loaded page is completed is for loading images, fonts and embedded stuff like Google Maps, Google Translate, whatever.

Full Page Caching for e-commerce is a pipe dream which simply doesn't want to die.

Link to comment
Share on other sites

6 minutes ago, Traumflug said:

Full Page Caching for e-commerce is a pipe dream which simply doesn't want to die.

FPC for ecommerce without exception is obviously a very bad idea. No one refers to FPC as actual F-u-l-l p-a-g-e caching, that would never work, and we both know that.

The scenarios you describe are obviously avoided even on a so called "Full page cache", as there are sections and modules which needs to load dynamically.

 

1 hour ago, datakick said:

But yeah, FPC is working correctly. It is working as designed, although design is seriously flawed 🙂

Thanks for the answer 👍 Could you remind me why PrestaShop cache modules are incompatible with thirty bees?

Link to comment
Share on other sites

7 minutes ago, Bull said:

Could you remind me why PrestaShop cache modules are incompatible with thirty bees?

FPC modules depends on overrides to hack into the core system. In this particular area, thirty bees core is very different compared to vanilla ps16, because of native FPC cache. This difference means that third party FPC overrides might not work. I'm not saying they don't

 

Link to comment
Share on other sites

1 hour ago, Bull said:

FPC for ecommerce without exception is obviously a very bad idea. No one refers to FPC as actual F-u-l-l p-a-g-e caching, that would never work, and we both know that.

Why do you bring this up, then, like so many other do? Makes no sense. Constantly asking for the impossible is, ... well, I'll stop talking here.

Link to comment
Share on other sites

7 minutes ago, Traumflug said:

Why do you bring this up, then, like so many other do? Makes no sense. Constantly asking for the impossible is, ... well, I'll stop talking here.

Read my first post. I never brought up what you are talking about. I simply asked a question about the current thirty bees full page cache - and I got the answer i was looking for.

Im not sure what you are trying to discuss, but it's not an answer to my question.

Edited by Bull
Link to comment
Share on other sites

  • 1 month later...
On 3/22/2021 at 3:43 PM, datakick said:

Full page cache works, to some extent.

Problem with this kind of caches is that... well they will never work reliably with thirtybees/prestashop system, because there is no way to detect when something changed and flush the cache. Which means that your store will, ultimately, display stale information.

For many merchants this is acceptable. But you must be OK with stuff like

  • your customer entering new product review, and then this review not being displayed for couple of hours
  • you change product price, and it correctly changes on product page, but not in category listing
  • ...

Note that you would experience these issues with tb native FPC, and with any other similar solution. As I said, there is no way to notify caching layer to flush the cache when content changes.

In my experience thirty bees is pretty fast, and you can usually work very well without FPC. If your server is slow, there is probably some reason behind that -- badly written module, bad server, etc.

Speaking of the FPC. I just tested it. Is it normal that it always misses? I cant get it to HIT any page. It's always

x-thirtybees-pagecache: MISS

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...