What effect does the "Default Maximum Cache Lifetime" have when "Check database timestamps for any site changes" is turned on and the "Clear expired pages on cron run" is enabled?

Comments

gregarios’s picture

Title: Default Maximum Cache Lifetime when Check database timestamps is enabled » Maximum Cache Lifetime with Check database timestamps Question
mikeytown2’s picture

When "clear expired pages on cron run" is enabled (default), every time cron runs any cached page that is older then the given "Maximum Cache Lifetime" is marked as expired, and will be cleared from the cache.

If you have "Check database timestamps for any site changes" enabled then it will check the following tables for any changes to the timestamp stored inside:
* node_revisions
* files
* comments
* node
* node_comment_statistics
* votingapi_vote
If nothing has changed in here then odds are nothing has changed on the site, thus it will skip the "clear expired pages on cron run" code and no pages will be cleared from the cache, even if it should be marked as expired. If your site doesn't change much (brochureware), then this is a good option.

I hope this is helpful, Let me know if you have any other questions. If this fully answered this specific question then mark this thread as closed; if not keep asking.

gregarios’s picture

So, when your site is essentially set up like your "brochureware" example, then "Default Maximum Cache Lifetime" has no effect whatsoever, no matter what its setting is?

What I'm wondering is this: I have it set up like brochureware, but every day or two the nodes change on the site because a views block may change. The views block is on every page of the site. The site has over 8000 nodes. Is there a "bad" setting that will cause the Boost to scan every node on the site on a cron run?

mikeytown2’s picture

when your site is essentially set up like your "brochureware" example, then "Default Maximum Cache Lifetime" has no effect whatsoever, no matter what its setting is?

That is correct; why flush all the pages if nothing has changed?

Having a view that changes & is on every page; that would require a complete flush of the cache in order for it to show up. In this case I recommend using ajax to load that content dynamically; & if its the same info, cache it and then refresh it on cron runs. Cache on cron is what I do for the stats block.
http://drupal.org/node/657826#comment-2372308
http://groups.drupal.org/node/24825

In terms of triggering the "Has site changed bit" these are the tables boost scans
node_revisions
files
comments
node
node_comment_statistics
votingapi_vote

mikeytown2’s picture

Status: Active » Fixed

marking as fixed. reopen if you have more questions about this subject.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.