Hi,

I'd like boost to leave the cache files alone and simply overwrite them once they become expire. From the code I discovered that boost's cron hook purges all expired cache files from the cache directory. Would there be any negative effect on boost's static caching if its cron hook wasn't allowed to run (comment out boost_cron() in boost.module)? Other than cache files piling up overtime?

Thanks,

sn

Comments

deverman’s picture

I also have a problem with boost on my cron runs. We found that our cron was taking a long time to complete and so we changed core to record the start and end time between cron hook calls. We found that the longest time was with boost. It takes around 396581.86ms to recurse the whole directory to remove the expired files. I think we have a slow disk on our server plus a fairly large site with a lot of cached files. I guess boost should take a different approach for deleting expired files in that it should limit it self to how many files it checks per cron run instead of a full blown recursive traversal.

Arto’s picture

Assigned: Unassigned » Arto
alex s’s picture

Problem of dynamic cache expiration can be solved with apache's RewriteMap directive (need access to httpd.conf) and a few lines of php code. If you are intrested in, i can post detailed explanation.

deverman’s picture

Yes, can you please post some sample code of how to make this happen my server disk is slow and feel that boost could be slowing the whole thing down on cron run.

alex s’s picture

deverman, look at this:
http://drupal.org/node/331537

mikeytown2’s picture

Status: Active » Closed (fixed)

Closing all 5.x issues; will only reevaluate if someone steps up #454652: Looking for a co-maintainer - 5.x

Reason is 6.x has 10x as many users as 5.x; also last 5.x dev was over a year ago. The 5.x issue queue needs to go.

autyzm’s picture

Version: 5.x-1.x-dev » 6.x-1.18

Can we reopen this, please?
I'm using D6 and I'm noticing same problem.
http://forumautyzmu.pl <- site is pretty big, there is over 6000 pages to remove each cron run and it takes very long time (more than 30 minutes).

mikeytown2’s picture

Assigned: Arto » Unassigned

You can configure boost to overwrite the pages; you have to use the crawler. 30 minutes to remove 6,000 files doesn't seem correct. I've seen it take around 40 minutes to remove over a million files.