I have a class that loads the
Mage::app()->getCache(), and call the cache methods.
Well this is working very well for Files. I can load and read. But when I switch to Memcached in
local.xml, the cache stops working. And I have no errors, no warnings. But updating
true, I see this message:
WARN (4): Zend_Cache_Core::save() / write_control : written and read data do not match
IMPORTANT: Frontend and Session cache works like a charm. What could be happening?
I was logging
Zend_Cache_Backend_Memcached and discovered that when I call my save method...
$cache = Mage::app()->getCache(); $cache->save('my_value', 'my_id', array(), 3600);
...the last one Lifetime was being converted to string. I don't know when it happens in ZF but omitting Lifetime solved my problem:
$cache->save('my_value', 'my_id', array());