const KEY_SUFFIX = ':2';
/**
- * Constructor
- *
* Available parameters are:
* - nativeSerialize: If true, pass objects to apc_store(), and trust it
* to serialize them correctly. If false, serialize
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 );
return $value;
}
- public function delete( $key ) {
+ public function delete( $key, $flags = 0 ) {
apc_delete( $key . self::KEY_SUFFIX );
return true;