\thinkCache

Class Cache

Summary

Methods
Properties
Constants
__construct()
connect()
init()
__make()
getConfig()
setConfig()
store()
__call()
No public properties found
No constants found
No protected methods found
$instance
$config
$handler
N/A
No private methods found
No private properties found
N/A

Properties

$instance

$instance : array

缓存实例

Type

array

$config

$config : array

缓存配置

Type

array

$handler

$handler : object

操作句柄

Type

object

Methods

__construct()

__construct(array  $config = []) : mixed

Parameters

array $config

Returns

mixed —

connect()

connect(array  $options = [], bool|string  $name = false) : \think\cache\Driver

连接缓存

Parameters

array $options

配置数组

bool|string $name

缓存连接标识 true 强制重新连接

Returns

\think\cache\Driver —

init()

init(array  $options = [], bool  $force = false) : \think\cache\Driver

自动初始化缓存

Parameters

array $options

配置数组

bool $force

强制更新

Returns

\think\cache\Driver —

__make()

__make(\think\Config  $config) : mixed

Parameters

\think\Config $config

Returns

mixed —

getConfig()

getConfig() : mixed

Returns

mixed —

setConfig()

setConfig(array  $config) : mixed

Parameters

array $config

Returns

mixed —

store()

store(string  $name = '') : \think\cache\Driver

切换缓存类型 需要配置 cache.type 为 complex

Parameters

string $name

缓存标识

Returns

\think\cache\Driver —

__call()

__call(mixed  $method, mixed  $args) : mixed

Parameters

mixed $method
mixed $args

Returns

mixed —