PHP Class think\cache\driver\Memcached

Inheritance: extends think\Cache
Afficher le fichier Open project: top-think/framework Class Usage Examples

Protected Properties

Свойство Type Description
$options

Méthodes publiques

Méthode Description
__construct ( array $options = [] ) 架构函数
clear ( string $tag = null ) : boolean 清除缓存
dec ( string $name, integer $step = 1 ) : false | integer 自减缓存(针对数值缓存)
get ( string $name, mixed $default = false ) : mixed 读取缓存
has ( string $name ) : boolean 判断缓存
inc ( string $name, integer $step = 1 ) : false | integer 自增缓存(针对数值缓存)
rm ( string $name, boolean | false $ttl = false ) : boolean 删除缓存
set ( string $name, mixed $value, integer $expire = null ) : boolean 写入缓存

Method Details

__construct() public méthode

架构函数
public __construct ( array $options = [] )
$options array 缓存参数

clear() public méthode

清除缓存
public clear ( string $tag = null ) : boolean
$tag string 标签名
Résultat boolean

dec() public méthode

自减缓存(针对数值缓存)
public dec ( string $name, integer $step = 1 ) : false | integer
$name string 缓存变量名
$step integer 步长
Résultat false | integer

get() public méthode

读取缓存
public get ( string $name, mixed $default = false ) : mixed
$name string 缓存变量名
$default mixed 默认值
Résultat mixed

has() public méthode

判断缓存
public has ( string $name ) : boolean
$name string 缓存变量名
Résultat boolean

inc() public méthode

自增缓存(针对数值缓存)
public inc ( string $name, integer $step = 1 ) : false | integer
$name string 缓存变量名
$step integer 步长
Résultat false | integer

rm() public méthode

删除缓存
public rm ( string $name, boolean | false $ttl = false ) : boolean
$name string 缓存变量名
$ttl boolean | false
Résultat boolean

set() public méthode

写入缓存
public set ( string $name, mixed $value, integer $expire = null ) : boolean
$name string 缓存变量名
$value mixed 存储数据
$expire integer 有效时间(秒)
Résultat boolean

Property Details

$options protected_oe property

protected $options