3

Wondering if there is a way to control the time of day that core performance caching will expire and run cache clear all via cron.

I'd like to change my minimum lifetime setting as low as possible and use Expire or Cache Actions and/or Views Content Cache to get away from bulk cache clears on my site... which are causing WAY too much excess mySQL load. But I want this master cache clear to happen in the middle of the night, just after the daily backup.

1

Partial answer, but I typically handle exact scheduling and cron-but-not-cron tasks by using a custom script and calling it with wget in a crontab. You can use cron.php for guidance on how to bootstrap, and then write your own function to clear what you want, then put it in crontab to run when you want. Just remember to lock down the script in .htaccess or apache config.

  • 1
    Hmm... that's workable. Might opt for SuperCron or ElysiaCron before borrowing code and doing a custom script though. Suppose since I'm doing the backup via the server and cache via cron I can handle it that way, but for sites with Backup&Migrate it's all cron so it might get harry. – doublejosh Nov 29 '11 at 2:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.