Hi, I have a drupal installation with three domains, e.g. domain1.com, domain2.com and domain3.com. On the performance config page, I have to enter a cache file path. THis is automatically shown as cache/www.domain1.com. So I click save and try out the boost module. I start browsing on domain2.com.
Problem? Cache files for domain2.com are saved in cache/www.domain1.com ... I tried to use i18n_variables to make that input field multilingual, (to enter different values per domain/language) but that does not work.
Apparently this logic does not work. Of course the cache file path should NOT automatically include a www.domain1.com, it should only have "cache" and dynamically decide which domain to add after the slash.
What to do to make it multi site?
Comment | File | Size | Author |
---|---|---|---|
#17 | boost-478644.patch | 967 bytes | mikeytown2 |
#6 | boost-478644.patch | 2.27 KB | mikeytown2 |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedSo my point is, I have a single database for three domains. I need to split the "cache file path" value across three domains, within one database. I understand it would have worked, If I had used three separate databases.
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedI solved my problem by changing:
hardcoded into
There should be an option to do this. Or at least a token [http_host] to work with in cache path. I dont know how else to make boost 'really' multisite, if you cant work from 1 database.
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedBy the way, I want to express my utmost gratitude for this module! I got it working multisite, and JEZUS CHRIST its 100x faster! I have fast traffic hosting, but Drupal demands way too much PHP processing. Those days are over! Thanks!
Comment #4
mikeytown2 CreditAttribution: mikeytown2 commentedThanks for the report; I haven't encountered people doing a multisite off of one database. I'll work on an option in administration that will allow for this.
Comment #5
mikeytown2 CreditAttribution: mikeytown2 commentedyou should probably run your code like this since there isn't a variable in the database called
'cache/'.$_SERVER['HTTP_HOST']
Comment #6
mikeytown2 CreditAttribution: mikeytown2 commentedhere's a patch that adds a setting under admin/settings/performance => Static page cache => Advanced settings => Do not store the cache file path in the database. Enable it and let me know if it works for you.
Comment #7
mikeytown2 CreditAttribution: mikeytown2 commentedcommitted
Comment #8
Anonymous (not verified) CreditAttribution: Anonymous commentedWow, thanks for following up!
Comment #10
dankohn CreditAttribution: dankohn commentedHi, I'm not seeing this option "admin/settings/performance => Static page cache => Advanced settings => Do not store the cache file path in the database". It's an issue because I move the same database between a staging and a production server. I don't want this path to be hardcoded in, nor should it need to be, since boost knows the name of the server. When I manually changed it to "cache/thissite" I got this error on my status page:
Cache file path: is not set to the default(cache/dev.healingthresholds.net).
The simplest solution may be to just allow the "Cache file path:" to be empty, and say that if it is, it will default to "cache/dev.healingthresholds.net". That way, only people who manually want to set it need to.
Comment #11
mikeytown2 CreditAttribution: mikeytown2 commentedIt's moved to "Boost directories and file extensions"
http://drupal.org/node/545908#direct
Close this issue if that solves your problem.
Comment #12
dankohn CreditAttribution: dankohn commentedSorry, I don't think I understand. I'd like to change "Cache file path:" to something that doesn't rely on a domain name. Your documentation says that the"default setting is to store the files in a directory named cache/normal/". But the comment under the "Cache file path:" setting says "The default setting is to store the files in a directory named cache/dev.healingthresholds.net under the Drupal installation directory". When I change that to "cache/normal/", I get this yellow warning message on the status page:
Boost Cache path
Cache file path: is not set to the default(cache/dev.healingthresholds.net).
What I'm requesting is:
1) if using "cache/normal/" works, don't create a warning message, and make it the default.
2) Either way, interpret a null "Cache file path:" as "use the default".
Comment #13
mikeytown2 CreditAttribution: mikeytown2 commentedWhat happens when you check the "Do not store the cache file path in the database" check box? The Cache file path text box should go away
Comment #14
dalinwould it make more sense if the default was to not store the value in the database, but give the admin the ability to override it? Makes sense to me since a good percentage of sites that use Boost will be using it in a multi-stage development environment (i.e. dev.site.com, staging.site.com, www.site.com). Which is effectively a multi-site installation. In scenarios like this you often need to copy a database from one site to another and then I'm always Whiskey Tango Foxtrot why isn't Boost working? Oh yeah I need to change things on the Boost settings page.
I'm guessing that on the flip side there aren't too many use cases for needing a custom directory within the cache folder.
Comment #15
dankohn CreditAttribution: dankohn commentedYes, changing the default would make a lot of sense. If it auto-creates in the right directory, I think few people will ever bother changing it.
But I would like to confirm that the settings suggested to me did just what I need, and so I'm all set. I'm changing to a feature request, but please feel free to close out.
Comment #16
mikeytown2 CreditAttribution: mikeytown2 commentedGood point; I'll change the default.
Comment #17
mikeytown2 CreditAttribution: mikeytown2 commentedComment #18
mikeytown2 CreditAttribution: mikeytown2 commentedcommitted