thinkphp-wechat/thinkphp/library/think/facade/Cache.php
Wenbin.Wang d49c9fde59 代码
2021-12-24 16:40:05 +08:00

46 lines
2.1 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace think\facade;
use think\Facade;
/**
* @see \think\Cache
* @mixin \think\Cache
* @method \think\cache\Driver connect(array $options = [], mixed $name = false) static 连接缓存
* @method \think\cache\Driver init(array $options = []) static 初始化缓存
* @method \think\cache\Driver store(string $name = '') static 切换缓存类型
* @method bool has(string $name) static 判断缓存是否存在
* @method mixed get(string $name, mixed $default = false) static 读取缓存
* @method mixed pull(string $name) static 读取缓存并删除
* @method mixed set(string $name, mixed $value, int $expire = null) static 设置缓存
* @method mixed remember(string $name, mixed $value, int $expire = null) static 如果不存在则写入缓存
* @method mixed inc(string $name, int $step = 1) static 自增缓存(针对数值缓存)
* @method mixed dec(string $name, int $step = 1) static 自减缓存(针对数值缓存)
* @method bool rm(string $name) static 删除缓存
* @method bool clear(string $tag = null) static 清除缓存
* @method mixed tag(string $name, mixed $keys = null, bool $overlay = false) static 缓存标签
* @method object handler() static 返回句柄对象,可执行其它高级方法
*/
class Cache extends Facade
{
/**
* 获取当前Facade对应类名或者已经绑定的容器对象标识
* @access protected
* @return string
*/
protected static function getFacadeClass()
{
return 'cache';
}
}