Hi there. I'm using Boost along with Cache Expiration in order to flush pages after a node is created or modified. Everything's working great so far (pages are cached and flushed accordingly).

However, I cannot figure out whether I just misunderstood how Boost works or whether I'm doing something wrong. I've set the maximum cache lifetime to 1 hour, and pages are being saved in the cache just fine, however, once the maximum time has expired, the site keeps serving the same cached copy of every single page that hasn't been directly modified.

What I mean is: once the maximum cache lifetime of any given page is over, shouldn't Boost ignore the cached page and recreate it automatically when it's served to the very first anonymous user? Or the page will be flushed only when cron gets executed?

Thanks in advance for your help!

Comments

Proteo’s picture

OK, I got it. Just in case somebody else is looking for the same answer, here's the deal:

a. Boost won't discard or recreate static pages by itself, even if they're obsolete.
b. You need to set up and configure Cron to take care of this.

Since I want to flush expired pages every 15 minutes, but don't want to burden the system running a full Cron task every 15 minutes, here's a mini tutorial of what I did:

1. Install and enable Ultimate Cron.
2. Navigate to /admin/config/system/cron/scheduler and choose a method to handle the default scheduler: "Simple" if you don't mind the exact time to run most cron jobs, or "Crontab" if you want to have full control.
3. Open the tab of your selected method and set a time/period. Personally, I wanted to run most cron jobs every six hours, so I selected "Crontab" and in the Crontab tab I entered 0 */6 * * * in the Rules field.
4. Open the Jobs tab, and edit the Boost entry. I wanted to flush expired pages every 15 minutes, so I entered */15 * * * * in the Rules field.
5. Set up your server or dev box to run the cron task. Here's a good tutorial if you're using cPanel. Make sure to set up the cron task every minute as indicated in the documentation. For some reason, accesing the cron page every 5 minutes didn't yield reliable results for me.

Best regards.