I am disappointed with memcached. Working with it has been far from easy.
An example:
$memcache = new Memcache;
$memcache->connect('127.0.0.1', 11211) or die ("Could not connect");
$memcache->set('id', $array, 120);
I set this about an hour ago – and it is still there! The manual says can use the “number of seconds starting from current time” as parameter. So why is the expiry ignored?
Another thing that bugs me is that sometimes values are not written. It all is pretty much random.
“argyleblanket” mentioned running into those problems in the php manual:
http://www.php.net/manual/en/memcache.set.php#84032
I have implemented that fallback on all my replace() calls as well. I don’t get why it won’t just work on the first call. Why offer a replace() function if it’s in the stars if it replaces the content or not?
The question is why would I trust such a software to do anything of importance
and is there a way to make it more reliable?
You’re using wrong syntax. The 3rd parameter is the compression flag.
Make a simple interface such as this following. It can help you: