1

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"?

4

1 回答 1

2

该模块的文档说:

如果你想让多个 Drupal 安装共享 memcached 实例,你需要在 settings.php 的 $confarray 中为每个 Drupal 安装包含一个唯一的前缀:

$conf['memcache_key_prefix'] = 'something_unique';

仅当您使用同一个 memcached 实例安装多个 Drupal 时才需要该参数;如果只有 Drupal 安装,则不需要它。
只要您为每个 Drupal 安装使用不同的值,您就可以使用您想要的值。您也可以使用域名(包括子域名)。

于 2013-01-21T01:11:02.150 回答