Hi:
In thread re Cacherouter and Boost, I mentioned that it didn't seem many pages were being cached.
After a little checking, and changing settings, I think this was because all cached pages were being deleted on cron runs (using poormanscron) - so even with 16 weeks set, pages soon gone. Noticed this when I checked Drupal log w reports on activity: where it said cron ran, also noted all boost cache pages deleted.
I believe the issue for me was "Ignore cache flushing" setting.
I'd had this "disabled" (not sure if as the default).
I changed, to make it "only ignore complete fushes" [there's a typo for "flushes" in settings here]. After this, seems to be working better, w cached pages evidently retained, and numbers of them increasing as people/bots move thro sites.
Thinking re Boost, I wonder if using it means some Drupal actions, inc w modules - like bad behavior checking if naughty bods visiting pages; module to fudge email addresses; even Drupal's logging numbers of page views - might not happen when people/bots visiting cached pages. Not sure.
Mike: I noted re info perhaps useful for instructions. Some attempt at revisions, here and there, below, in case helpful to you.
4. Go to [Administer >> Site configuration >> Performance].
Specify the cache directory, which should be something like cache/www.example.com (keeping the default directory is highly recommended) and must be writable by the web server: you may need to create the directory, and set the permissions so it is writeeable. If you will choose to use gzip, for compression of files cached by Boost, you also specify and may need to create the folder for this; the default is of the format cache/gz/www.example.com
There are various other options for settings here, including:
Default minimum cache lifetime - as cached pages are created, they are given an expire by date and time, which is the current date and time plus the minimum cache lifetime. These dates and times are checked on each cron run; and if a page is expired, the cache is cleared, and a new cached version will be created the next time the page is created by an anonymous user (including bots).
Under Boost advanced settings: Ignore cache flushing. For most sites, the best option is "Only ignore complete flushes" - on cron runs, only expired pages will be deleted.
5. IMPORTANT: after backing up the original .htaccess file in your Drupal
installation directory, add the rules found in boosted1.txt, or generated via the performance settings page (providing a wysiwyg editor doesn't load for this page).
The default.txt file shows you the exact placement of where the rules go,
in case you're not sure.
6. Log out from Drupal (or use another browser) to browse around your site
as the anonymous user. Ensure that static files are indeed being generated into the Boost cache directory you specified above (#4); and if you opt to use gzip, likewise check gzipped files are being generated in the directory you specified for this.
The performance settings page shows how many pages are being cached by Boost, and (for pages Boost cannot cache) by Drupal core.
7. Set $base_url variable in /sites/default/settings.php ( 125 line or so )
... This should be something like http://www.example.com
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | poormanscronScreenshot2.png | 36.22 KB | francewhoa |
| #9 | boost-512314.patch | 2.43 KB | mikeytown2 |
| #3 | boost-512314.patch | 3.87 KB | mikeytown2 |
Comments
Comment #1
mikeytown2 commentedIt could be an issue with poormanscron. In boost I check to see if cron is being run by checking
variable_get('cron_semaphore', FALSE)inside boost_flush_caches(). All hook_flush_caches() get called on cron runs (http://api.drupal.org/api/function/system_cron); but I don't want to kill the boost cache on cron. Because of poormanscron's popularity I need to support it better.After taking a look at poormanscron it calls http://api.drupal.org/api/function/drupal_cron_run which sets
variable_set('cron_semaphore', time());. So I'm not sure why cron is clearing everything. Looks like I need to debug this one.One thing to consider, if every page is cached, drupal is never accessed, thus poormanscron will never run until someone visits a non cached page (not anonymous user looking at site, ect...)
Core stats and boost where only recently added so they work together... in short there is a lot of work to be done. You can track the progress of that in these 3 issues.
#503628: AJAX Load stats
#505766: Does this support the Who's online block?
#506906: Support node read count display
Access restrictions are not enforced on viewing cached pages. Fudging of email addresses should still work.
Thanks for the documentation. I will look over it in more detail at a later date.
Comment #2
DocMartin commentedThanks for another prompt response.
I hadn't thought re poormanscron being another part of Drupal that won't work w cached pages.
Maybe not too big a deal; if lots of cached pages being served, maybe less need for cron to do its stuff.
Comment #3
mikeytown2 commentedDocumentation changes below
Comment #4
mikeytown2 commentedcommitted
Comment #5
mikeytown2 commentedComment #6
mikeytown2 commentedI can reproduce this behavior. Poormanscron's latest dev fixes the issue. 1.0 uses
module_invoke_all('cron');; latest dev usesdrupal_cron_run(). As for a fix, my recommendation is to use the latest dev. The alt would be to use a backtrace to detect that it was called from poormanscron_exit(), which is something I don't want to do. Going to mark this issue as fixed, since it's fixed in Poormanscron's latest dev.Comment #7
DocMartin commentedGood to see this solved; albeit best if poormanscron recommended version updated
Hopefully will help broaden usage of Boost, so speeding more Drupal sites
Comment #9
mikeytown2 commentedAdded in a check to make sure it's the right version
Comment #10
mikeytown2 commentedcommitted
Comment #12
francewhoaThanks for fixing this. Confirming that #9 'Added in a check to make sure it's the right version' works. Find below screenshot to clarify.