getUnserialize( apcu_fetch( $key . self::KEY_SUFFIX ) ); } public function set( $key, $value, $exptime = 0, $flags = 0 ) { apcu_store( $key . self::KEY_SUFFIX, $this->setSerialize( $value ), $exptime ); return true; } public function delete( $key ) { apcu_delete( $key . self::KEY_SUFFIX ); return true; } public function incr( $key, $value = 1 ) { /** * @todo When we only support php 7 or higher remove this hack * * https://github.com/krakjoe/apcu/issues/166 */ if ( apcu_exists( $key . self::KEY_SUFFIX ) ) { return apcu_inc( $key . self::KEY_SUFFIX, $value ); } else { return false; } } public function decr( $key, $value = 1 ) { /** * @todo When we only support php 7 or higher remove this hack * * https://github.com/krakjoe/apcu/issues/166 */ if ( apcu_exists( $key . self::KEY_SUFFIX ) ) { return apcu_dec( $key . self::KEY_SUFFIX, $value ); } else { return false; } } }