我实际上是想了解为什么memcached不存储给定ID的数据.
我正在使用基于Zend Framework 1.11.1的Magento EE 1.11.2.0.
用于处理memcached的接口是Zend_Cache_Backend_Memcached
现在这里没有这么大的自定义代码,这是我保存缓存的自定义容器:
public function saveCache($blockContent)
{
$lifeTime = 86400 * 30 * 6;
$tags = array(
My_Module_Model_PageCache_Container_Category_Blabla::CACHE_TAG
);
$cacheId = $this->_getCacheId();
if ($cacheId !== false) {
$this->_saveCache($blockContent, $cacheId, $tags, $lifeTime);
}
return $this;
}
我只是强迫magento使用我的自定义缓存标记和固定的生命周期(memcache不支持自定义标记,所以我猜这不是问题)我的生命周期也没有在memcached中使用,因为我可以看到默认的是用过的.
一开始我认为这个问题是由一个长缓存ID引起的,但现在在减少它之后(< 31 char)这对我没有帮助: 我可以看到,对于我的缓存ID,load()方法Zend_Cache_Backend_Memcached总是返回false.
虽然save()方法返回true,就像它被缓存一样.
这是我的local.xml配置:
1
0
memcached
database
memcached
database
我还尝试使用此命令检查memcached的条目以查看我的id是否已存储:
echo’statss cachedump 35 35’| sudo nc -U /tmp/memcached.sock
>任何关于这个原因的想法?
>我该如何调试? (我不能使用xdebug进入Zend_Cache_Backend_Memcached)