Last modified: 2010-05-15 15:59:45 UTC
When I've enabled memcached in LocalSettings.php ($wgMainCacheType = CACHE_MEMCACHED; $wgMemCachedServers = array('127.0.0.1:11211');) there is a php notice showing on every page: Notice: Constant MEMCACHE_COMPRESSED already defined in <path_here>\includes\memcached-client.php on line 78 Don't know, how to test if memcached is really used, because page load speed doesn't seem to be changed.
I'm also seeing this on Mac OSX with 1.12.0. Oddly it doesn't complain about the other define statements surrounding line 78. Looking at the PHP documentation, I am wondering if some installations have MEMCACHE_COMPRESSED predefined. http://us2.php.net/manual/en/memcache.constants.php if I insert echo MEMCACHE_COMPRESSED; at line 79, the wiki prints 2.
Constant is defined by memcached module, that is used by php (e.g. "LoadModule memcached.so" in php.ini). I propose using if (defined('MEMCACHE_COMPRESSED')) { define('MEMCACHE_COMPRESSED ... } or not to define constant at all if it is always defined by php module ifself :)
Constant renamed in r37295
Reverted in r37360 -- r37295 changed Memcache::COMPRESSED, not MEMCACHE_COMPRESSED. In fact I see no sign of MEMCACHE_COMPRESSED in the entire source tree. It appears to have been replaced with the class constant some time since 1.12 branching, making the issue moot.