Tuesday, 2 January 2018

Full Page Caching With Personalized Dynamic Content


We’ve talked a lot about WordPress performance here at Delicious Brains and the importance of page caching. However, implementing a page cache on highly dynamic sites or sites which display personalized content isn’t always easy. Previously, we’ve covered Microcaching for dynamic content, but that still doesn’t help when personalized content is involved. In this article we’re going to tackle that issue. We’re going to use Easy Digital Downloads and the Themedd theme to build a fictitious online store. This will present us with a few problem areas that mean we can’t perform page caching out-of-the-box:
The top right navigation displays the current cart totals.
Purchase buttons are replaced with checkout buttons when the item already exists in the cart.
The EDD team provides a simple solution to this problem by setting the edd_items_in_cart cookie when a user has items in their cart. This can then be used to bypass the page cache entirely when the cookie is present. However, we lose all the benefits of page caching for those users:
Blazingly fast load times
Less server strain, due to PHP and MySQL not being hit
This solution doesn’t seem
Source: https://managewp.org/articles/16881/full-page-caching-with-personalized-dynamic-content




source https://williechiu40.wordpress.com/2018/01/02/full-page-caching-with-personalized-dynamic-content/

No comments:

Post a Comment