From: Michael M Slusarz Date: Thu, 23 Jul 2009 20:18:10 +0000 (-0600) Subject: Fix memcache locking issue. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=024ed5ffd88be18fc5022fae3b85d8b5f5494559;p=horde.git Fix memcache locking issue. If you don't specify a time value to delete(), apparently memcache takes that as expiring in 1 second - not an instantaneous expire. Which isn't mentioned in the documentation and is not very intuitive (delete means delete). This was causing slow load times on message with a lot of attached images - the thumbnails were slow to load because the sessions were not being marked as unlocked for at least a second, preventing the next image from loading. --- diff --git a/framework/Memcache/lib/Horde/Memcache.php b/framework/Memcache/lib/Horde/Memcache.php index 9fcea2dfd..f8e048592 100644 --- a/framework/Memcache/lib/Horde/Memcache.php +++ b/framework/Memcache/lib/Horde/Memcache.php @@ -383,7 +383,7 @@ class Horde_Memcache */ public function unlock($key) { - $this->_memcache->delete($this->_key($key . '_l')); + $this->_memcache->delete($this->_key($key . '_l'), 0); } /**