Running on two drupal installations ?
gdtechindia - March 25, 2008 - 09:14
| Project: | Memcache API and Integration |
| Version: | 5.x-1.7 |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Hi,
I am having a small issue. We have one instance of memcache on our dedicated server.
We are running two different drupal websites which aren't connected.
http://www.site.com
http://www.site.com/subcat
Should we run two instances of memcache or only one will help.
Thanks in advance.

#1
I have the same question. After installing a second instance to act as a sandbox I was seeing admin properties switching to first installation. Very strange. Dropped memcache for the second installation (sandbox) until I understand the problem a bit more. I
#2
There is a documented feature of memcache to do "prefixing" per site.
From the instructions on the project page and README.
Prefixing
If you want to have multiple Drupal installations share memcached instances, you need to include a unique prefix for each Drupal installation in the $conf array of settings.php:
<?php$conf = array(
'memcache_key_prefix' => 'something_unique',
);
?>
#3
you can prefix, but as i understand it, you're going to flush everything for site 2 whenever you flush for site 1 and vice-versa.
drupal does a lot of cache_clear_all with wildcards, and since memcache can't support wildcards, you get a lot of full cache flushes.
better to have separate memcache instances for each site.
best to have separate memcache instances for each cache (cache_page, cache_menu, etc.)
#4
you're absolutely correct. you will see extremely low hit rates if you have views and cck turned on using the same "bins". This will be even worse running two sites.
#5
Thanks for the options. Right now the second site is in sandbox mode, so it is a good time to try some alternatives.
#6
Automatically closed -- issue fixed for two weeks with no activity.