Reputation: 111
I have installed memcached and drupal module memcache and in linux command line :
-bash-4.1# netstat -tap | grep memcached
tcp 0 0 *:memcache : LISTEN 8431/memcached
tcp 0 0 *:memcache : LISTEN 8431/memcached
Seems like it is listening to IP and Port but now the part where I get it to work with drupal 7.18 so I can see what is going on?
Following these instruction:
$conf['cache_backends'][] = 'sites/all/modules/memcache/memcache.inc';
$conf['cache_default_class'] = 'MemCacheDrupal';
$conf['memcache_key_prefix'] = 'something_unique';
/* note : Replace the "something_unique" in the last line with your own unique memcache key prefix. */
Where do I find "your own unique memcache key prefix"?
Upvotes: 1
Views: 1973
Reputation: 29679
The documentation for the module says:
If you want to have multiple Drupal installations share memcached instances, you need to include a unique prefix for each Drupal installation in the $confarray of settings.php:
$conf['memcache_key_prefix'] = 'something_unique';
You need that parameter only if you have more than one Drupal installation using the same memcached instance; in the case there is just a Drupal installation, you don't need it.
As long as you use a different value for each Drupal installation, you can use the value you want. You could also use the domain name (including the sub-domain name).
Upvotes: 2