I need some help because I can't get Boost to work on Drupal 7 Apache. I read the (obsolete) documentation available (readme.txt and handbook pages) but could not find the solution so far.
I went through the needed steps: module installation and activation, editing of .htaccess, editing robots.txt, activating the needed boost settings.
Status report does not show any problem and the html files are created in the cache directory but they are not served to anonymous browsing with the "page cached by boost ..." tag in the page source.
I noticed that the cached pages are constantly rebuilded so this has for sure to do with the cache lifetime settings. I tried for instance to put min and max to 1 week and then the cached pages are not rebuild immediately. Still I see no boost tag in the page source though. :/
Could someone enlight me about the needed cache lifetime settings because I do not really understand how it works. I understand that after the max cache lifetime is reached the cron job should delete the concerned page(s). I am not sure if it will then be rebuild immediately (by cron) or only when an anonymous user will ask again for it?
Now about the minimum cache lifetime if I put 0 sec does it mean that it will not be cached at all?
Last but not least what are the recommended values and will the cached pages automatically be renewed immediately (or upon first request) after I updated some content?
I hope these questions do make sense and sorry if they are noobs ones.
Thanks a lot for any help!
Comments
Comment #1
BlueDragon-1 commentedI would like to add something I just discovered. I am using a multilingual site (i18n) and the pages are only cached for one language. All the ones like say www.mysite.com/fr/contact are not cached at all e.g. I don't see the pages being build in the cache directory.
Is boost only able to cache a single language website?
EDIT: I just observed that though I set min and max cache lifetime to 1 week the cached pages are rebuilded immediately...
Comment #2
eduh commentedHi,
We did experience the same behaviour. After examining the code we did alter the function boost_transform_url as listed below:
(Thank you Erik Stielstra for helping with this issue)
Comment #3
eduh commentedOne more addition: we did notice that http://mysite/nl/a path to public image.jpg was served through index.php which is a waste of precious resources.
We did add in .htaccess this rule where nl is our language code
Comment #4
bgm commented@eduh: can you explain your patch?
I managed the reproduce the bug in a multi-lingual site, but I don't understand the patch, so I can't commit it for now until I do more testing.
Comment #5
bgm commentedSee also: #1151296: i18n front page pb
Comment #6
bgm commentedOK, I better understand the issue now. This is indeed the same as #1151296: i18n front page pb and the fix is similar. Please test that patch (or upgrade to the latest 7.x-1.x snapshot) and if not, re-open the issue.
Thanks!
Comment #8
rondev commentedCan't get it work. Although I think I reread well the installation instruction.
No pages are cached at all. Nothing in the boost folder and no tag in pages.
I use 18n prefix and installed the last dev of boost (2011/12/23 ISO8601)
Comment #9
bgm commented@ rondev: the bug you describe does not seem related to this issue (in this issue, pages for some languages were being served OK, but not translations). Please open a support request with more information about your hosting environment.
Comment #10
nicolas bouteille commentedHello BlueDragon,
I just read your first post and I have exactly the problem (files are being cached but not used) and the same questions about max and min life time meaning !!
Did you manage to find those answers ?
Thanks
Nicolas
EDIT ########
Just want to leave some feedback since I finally manage to make it work for me.
In my case the line that was breaking it all was the RewriteCond of the #NORMAL code bloc of .htaccess file, see below (the one that is commented) :
# NORMAL
# RewriteCond %{DOCUMENT_ROOT}/cache/%{ENV:boostpath}/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.html -s
RewriteRule .* cache/%{ENV:boostpath}/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}\.html [L,T=text/html]
I think there is a problem with my %{DOCUMENT_ROOT} because there is a message on the .htaccess Settings page :
"Value of /htdocs/public/www is recommended for this server. Please open an boost issue on Drupal.org, since apache and php might not be configured correctly."
I've debugged it, the %{DOCUMENT_ROOT} variable returns /htdocs/web, I've tried to hard code the line instead of %{DOCUMENT_ROOT}, replacing it by /htdocs/public/www, /public/www, /htdocs/web, /web and without trailing slash also... it never worked.
In the end I don't understand what is the aim of this line since it works fine without it. Maybe I'll have to discover it the hard way some day :) but for now this is my only choice to leave it commented.
Finally, I'd like to say I'm a bit disappointed with Boost that I find less reactive than the core cache, I mean once the page is in the cache.
Concretely, with core caching only the text changes smoothly and instantaneously, with Boost the page disappears and slides from top to bottom when it loads.
I am not taking away the fact that with core caching the user must load the page the first time he visits it, whereas with Boost the page loads instantaneously from the first visit. That is why I stick with Boost for that particular website because users might not need to visit each page more than once. But it seems like with core caching the page stays in the web browser's cache when with Boost the page is always loaded again and again from the Boost cache folders... no ?
It would be really nice to be able to use Boost to prevent user from having to load the page the first time and then to use core cache once it's loaded. I understand that it might be technically impossible since everything happens right in the .htaccess file so before everything else... Or maybe I need to enable some cache headers in the generated html pages of Boost so that it stays in the web browser's cache and it won't even bother to call the .htaccess file anymore...
Nicolas