dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
objectcache: make the BagOStuff::add() operation more atomic for APC
[lhc/web/wiklou.git]
/
includes
/
libs
/
objectcache
/
APCBagOStuff.php
diff --git
a/includes/libs/objectcache/APCBagOStuff.php
b/includes/libs/objectcache/APCBagOStuff.php
index
e41c3a2
..
847a1eb
100644
(file)
--- a/
includes/libs/objectcache/APCBagOStuff.php
+++ b/
includes/libs/objectcache/APCBagOStuff.php
@@
-97,6
+97,14
@@
class APCBagOStuff extends BagOStuff {
return true;
}
return true;
}
+ public function add( $key, $value, $exptime = 0, $flags = 0 ) {
+ return apc_add(
+ $key . self::KEY_SUFFIX,
+ $this->setSerialize( $value ),
+ $exptime
+ );
+ }
+
protected function setSerialize( $value ) {
if ( !$this->nativeSerialize && !$this->isInteger( $value ) ) {
$value = serialize( $value );
protected function setSerialize( $value ) {
if ( !$this->nativeSerialize && !$this->isInteger( $value ) ) {
$value = serialize( $value );
@@
-104,7
+112,7
@@
class APCBagOStuff extends BagOStuff {
return $value;
}
return $value;
}
- public function delete( $key ) {
+ public function delete( $key
, $flags = 0
) {
apc_delete( $key . self::KEY_SUFFIX );
return true;
apc_delete( $key . self::KEY_SUFFIX );
return true;