Cml\Cache\Apc::update PHP Method

update() public method

更新对象
public update ( mixed $key, mixed $value, integer $expire ) : boolean | integer
$key mixed 要更新的缓存的数据的key
$value mixed 要更新的要缓存的值,除resource类型外的数据类型
$expire integer 缓存的有效时间 0为不过期
return boolean | integer
    public function update($key, $value, $expire = 0)
    {
        $arr = $this->get($key);
        if (!empty($arr)) {
            $arr = array_merge($arr, $value);
            return $this->set($key, $arr, $expire);
        }
        return 0;
    }