Prestashop 1.6/1.7 full page caching plugin released!

Dan   

Prestashop is yet another popular opensource eCommerce platform written in php. We're releasing a module for Prestashop that allows for optimal full page caching with the Peakhour service. This allows for long lived caching of pages at the Peakhour edge, which get updated with the latest version when it is changed at Prestashop.

Full Page Caching dramatically improves load times by cutting out the time it takes for a CMS to generate a dynamic page. This is typically anywhere between half a second for a quick page, to 3-5 seconds for a slow one. Seeing is believing, here is a cache miss and hit from our client fatburnersonly.com.au:

Prestashop cache miss A typical cache miss on a category page. Origin has to make the page taking 2.49 seconds
Prestashop cache miss A cache hit! Only 35.7 milliseconds to deliver to the client from our Edge

Nearly 2.5 seconds has been taken off the time to first byte and largest contentful paint! That's without having to change anything with your website.

Tag Based Flushing

Like all our recent plugins, the Prestashop plugin adds a header with tag metadata for each cacheable page. This header is called X-Prestashop-Tag and contains the IDs of each relevant entity that is on the page, eg products, categories, brands, pages, etc. This meta-data gets stored alongside the cached page, then, when an entity gets changed in the Prestashop admin, eg a product price gets updated, then the plugin issues a flush by tag request to Peakhour. Peakhour finds all the pages that have the associated tag and invalidates them in the cache. The next request for the page gets passed through to origin and then re-cached.

Prestashop full page caching headers Headers returned by caching plugin.

Custom TTL

TTL (Time to live) is the amount of time a resource lives in a cache before the cache will check for a new version, you can control this within the plugin. The plugin then sets the peakhour-cdn-cache-control header, part of the new cdn-cache-control specification, so only Peakhour will respond to the cache directive.

Ajax Mini Cart

Mini carts are common dynamic sections of eCommerce websites that can prevent caching. The Peakhour plugin makes these load via Ajax so the maximum amount of pages are cacheable.

Prestashop mini cart You can see the mini cart in the top right, this is usually passed back in the generated page.

Cache varying

The same page can present different information depending on a variety of factors, eg whether a user is logged in or not, or if the store is multicurrency and the currency changes. The Peakhour Opencart plugin caters for this by changing a cookie value when these change and makes separate cache regions for the different possibilities.

The Results

The Peakhour Prestashop plugin can make a big difference to the performance of your store. Our client fatburnersonly.com.au have improved their 'good' webvitals scores by 20% in the two months they've been utilising Peakhour.

Prestashop web vitals improvement Full page caching was enabled half way through May. Note a significant amount of pages, eg checkout, admin etc cannot be cached, and are included in these stats

Grabbing the plugin

If you have a slow Prestashop store, then check out our plugin page or contact us for more information!

Website Performance Prestashop Plugins

© PEAKHOUR.IO PTY LTD 2024   ABN 76 619 930 826    All rights reserved.