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.
*/
public function unlock($key)
{
- $this->_memcache->delete($this->_key($key . '_l'));
+ $this->_memcache->delete($this->_key($key . '_l'), 0);
}
/**