aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acm
diff options
context:
space:
mode:
authorChris Smith <toonarmy@phpbb.com>2009-12-08 22:55:33 +0000
committerChris Smith <toonarmy@phpbb.com>2009-12-08 22:55:33 +0000
commitaedff9c97a72d2e47f8013e14a068400232b258e (patch)
treebe9cf679ed319fd93fdd54b8f9ea9152b1c8a092 /phpBB/includes/acm
parent5a2eb175bb28bd20fc3c874e655fc2b1715d7211 (diff)
downloadforums-aedff9c97a72d2e47f8013e14a068400232b258e.tar
forums-aedff9c97a72d2e47f8013e14a068400232b258e.tar.gz
forums-aedff9c97a72d2e47f8013e14a068400232b258e.tar.bz2
forums-aedff9c97a72d2e47f8013e14a068400232b258e.tar.xz
forums-aedff9c97a72d2e47f8013e14a068400232b258e.zip
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
Diffstat (limited to 'phpBB/includes/acm')
-rw-r--r--phpBB/includes/acm/acm_memcache.php6
1 files changed, 5 insertions, 1 deletions
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;
}
/**