Menú

How to Set Up a Cronjob to Automatically Clear Cache in Page Cache Pro

The Page Cache Pro module for PrestaShop significantly improves your website's speed, optimizes server resources, and boosts SEO rankings. One essential maintenance task is clearing expired cache, which ensures your site remains fast and efficient. In this guide, we'll walk you through the process of setting up a cronjob to automatically clear cache, keeping your site running smoothly.

Why clear cache?

Clearing cache is crucial because it removes outdated data and frees up server resources, ensuring your website delivers fresh and accurate content to users. Regular cache clearing prevents the buildup of stale data, which can slow down your site. We recommend clearing the cache once per hour to maintain optimal performance.

 

Why set up a cronjob?

  • Automation saves time: Automatically clears cache without manual intervention, saving you time and effort.
  • Consistent performance: Ensures regular removal of outdated data, keeping your website fast and responsive.
  • Improved user experience: Provides up-to-date content quickly, enhancing user satisfaction and engagement.
  • Enhanced SEO rankings: Maintains fast page load times, positively impacting your site's search engine rankings.
  • Resource optimization: Frees up server space and reduces load, optimizing server performance.

 

How to set up a cronjob to automatically clear cache for Page Cache Pro

To ensure your website's cache is regularly cleared and maintains optimal performance, you can easily set up a cronjob for the Page Cache Pro module. Here's a simple guide to help you configure it efficiently:

Step 1: From the module configuration page, click on the "Cronjob" tab.

Step 2: Here, you'll find the command for setting up a cronjob on your server. Copy this command along with the "Cronjob secure token".

Step 3: Set up cronjob in Server management tool: Paste the command and secure token into your cronjob setup in cPanel or the server management tool you are using.

Recommended settings:  We recommend setting the cronjob to run once every hour to clear the page cache and maintain optimal performance.

 

Execute Cronjob manually: If you want to manually clear the page cache, click the "Execute cronjob manually" button.

For more detailed instructions on setting up a cronjob, please refer to our guide "How to set up Cronjob for your site".

 

By setting up a cronjob to automatically clear cache, you ensure that your website remains fast, efficient, and delivers the most accurate content to your users. This automated process helps maintain optimal performance and enhances user experience.

Recuento de vistas: 17 vistas