From aedff9c97a72d2e47f8013e14a068400232b258e Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Tue, 8 Dec 2009 22:55:33 +0000 Subject: Fix potential data corruption issues with memcache ACM git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10307 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/acm/acm_memcache.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'phpBB/includes/acm') diff --git a/phpBB/includes/acm/acm_memcache.php b/phpBB/includes/acm/acm_memcache.php index 3077ee9615..52b8832749 100644 --- a/phpBB/includes/acm/acm_memcache.php +++ b/phpBB/includes/acm/acm_memcache.php @@ -105,7 +105,11 @@ class acm extends acm_memory */ function _write($var, $data, $ttl = 2592000) { - return $this->memcache->set($this->key_prefix . $var, $data, $this->flags, $ttl); + if (!$this->memcache->replace($this->key_prefix . $var, $data, $this->flags, $ttl)) + { + return $this->memcache->set($this->key_prefix . $var, $data, $this->flags, $ttl); + } + return true; } /** -- cgit v1.2.1