I turned on the query log in devel recently on a site we will be launching soon and I noticed quite a few queries that were "UPDATE cache SET ...." and "SELECT ... FROM CACHE..." I've checked many of these and they are all cache_set($cid,$val,'cache').
I have this in my settings.php:
/**
* Memcache variables:
*/
$ps_memcache_path = './sites/all/modules/contrib/memcache/memcache.inc';
$ps_memcache_bins = array(
'cache' => 'default',
'cache_form' => 'database',
);
$ps_memcache_dev_servers = array(
'127.0.0.1:41212' => 'default',
);
$ps_memcache_servers = array(
'server:41212' => 'default',
'server:41212' => 'default',
'server:41212' => 'default',
);
switch ($env) {
case 'local':
break;
case 'dev':
$conf['cache_inc'] = $ps_memcache_path;
$conf['memcache_key_prefix'] = 'ps_' . $env . '_';
$conf['memcache_servers'] = $ps_memcache_dev_servers;
$conf['memcache_bins'] = $ps_memcache_bins;
break;
case 'stage':
$conf['cache_inc'] = $ps_memcache_path;
$conf['memcache_key_prefix'] = 'ps_' . $env . '_';
$conf['memcache_servers'] = $ps_memcache_dev_servers;
$conf['memcache_bins'] = $ps_memcache_bins;
break;
case 'production':
$conf['cache_inc'] = $ps_memcache_path;
$conf['memcache_key_prefix'] = 'ps_';
$conf['memcache_servers'] = $ps_memcache_servers;
$conf['memcache_bins'] = $ps_memcache_bins;
break;
}
Am I missing something? What could I be forgetting?
Comments
Comment #1
bleen commentedHere is a sample from my query log ... the "cache_get"s in there that have "preprocess" in the key are explicitly set to use the "cache" table:

... and my memcaceh bins are barely being used. Something is awry
Comment #2
catchCan you stick a file_put_contents() or a dpm() inside this hunk?
If that's happening with the cache table, then you need to look at the $bins array to see what's going on.
Comment #3
bleen commented@catch:
These are the values I'm seeing in that hunk:
In this case I do NOT enter the if statement (as expected).
Comment #4
bleen commentedOK .... somehow the cache_get from /includes/cache.inc is being used ... how is this possible?
Comment #5
bleen commentedI had an error in my settings.php that caused cache_inc to be reset ... blarg!!
Thanks for looking catch
Comment #6
kourosh.a commentedHi, I have the same issue. Could you tell me what was the error in you setting.php ?