I use memcache to store Zend_Config (and other values). I set the values as follows:
$memcache = new Memcache(); ... if (!$config = $memcache->get($memcache->unique_key.APPLICATION_DOMAIN."#config")) { ... $memcache->set($memcache->unique_key.APPLICATION_DOMAIN."#config", $config); }
I delete the values as follows:
$memcache->delete($key);
After I delete the values from memcache, it appears correctly in the same connection as the remote one - calling $memcache->get($key) correctly gives me NULL . However, when I update the script (and establish a new connection to memcache), the data is returned as if the state of memcache had not been updated. I tried using replace instead (with some specific value), with the same effect - the value is not updated.
The call to $memcache->flush() works and removes everything from memcache, however I want to delete certain keys.
The manual page has a cryptic message from 5 years ago about incompatibilities between the versions of PECL and memcached (but this is from 5 years ago). Can someone explain to me what could happen?
I am using memcached 1.4.21 with memcache (PECL) 3.0.8 in PHP 5.6
source share