Menú

How to Configure Page Cache in Page Cache PRO module

Page caching is essential for significantly improving website speed by storing static content as HTML files. These HTML files are served instantly to visitors, reducing server load and enhancing user experience. To optimize the page cache feature, you can adjust various settings as follows:

  • From the module configuration page, navigate to “Page cache > Page cache settings” page.
  • Enable the “Page cache” switch to activate this feature.

Select pages to cache

Use the “Pages to cache” list to choose which web pages should be cached. Customize the cache lifetime for each page type to ensure optimal performance tailored to your website's needs.

Recommended cache lifetime settings:

Type of pageCache lifetime (*)Explanation
Homepage
1 daySuitable for websites with average traffic and frequently changing homepage content.
Category page
7 daysRegular updates are required to display the latest information.
Product page15 daysReduces server load as product pages typically change less frequently.
CMS page30 daysRequires fewer updates, making a longer cache time suitable.
New products page7 daysAdjust based on how often new products are updated.
Best-seller page7 daysInfrequent changes justify a longer cache time.
Supplier page30 daysSuitable for pages with less frequent updates.
Manufacturer page30 daysSimilar to supplier pages, with infrequent changes.
Contact page30 daysRarely changes, so a longer cache time is appropriate.
Prices-drop page1 dayAdjust based on how frequently product prices change.
Sitemap page7 daysAdjust based on how often your website content changes.

 

(*) NOTE

When you set the cache lifetime, cache files automatically expire and regenerate after the designated period. For instance, the homepage cache refreshes every day, while the product page caches refresh every 15 days. The Page Cache PRO module also provides options for flexible cache clearing to ensure customers always view the most updated content.

Automatic cache clearing options:

  • Automatically delete page cache when changing performance configuration: Clears the cache upon changing settings at “Advanced Parameters > Performance > Template Compilation”.
  • Automatically delete page cache when installing/uninstalling hook: Clears the cache during hook installation/uninstallation.
  • Automatically delete page cache when editing page data: Clears the cache for edited product pages immediately upon saving. Related pages are also cleared if this option is enabled.
  • Automatically delete page cache when adding or deleting a product from the cart: Updates product quantities on relevant pages but may frequently clear the page cache, potentially reducing caching effectiveness.

Activating these options ensures customers always see the latest content but can increase server resource usage. Balance performance and resource consumption by carefully selecting options to enable.

 

Set up cronjob to delete page cache

When a cache file expires, a new cache file is created upon user visit, and the old file is deleted. To manage unused files and free up server space, set up a cronjob to clear these files. If a page is accessed with no existing cache, a new cache file is generated.

For detailed instructions on setting up a cronjob for the Page Cache PRO module, please refer to the following guide: How to set up cronjob.

Recuento de vistas: 17 vistas