\CookieCache

Class CookieCache CK缓存模块 由于小主机用户较多,暂不使用Redis Ck存储不了太多数据,实际数据写入在session内!

Summary

Methods
Properties
Constants
read()
Return()
add()
del()
$Cache
$ms
$Key
$prefix
$query
$token
No constants found
No protected methods found
No protected properties found
N/A
loading()
$debug
N/A

Properties

$Cache

$Cache : array

Type

array — 全局通用函数缓存,防止多次载入相同数据

$ms

$ms : int

Type

int — 缓存时长

$Key

$Key : bool|string

Type

bool|string — 缓存命名,可在外部命名

$prefix

$prefix : bool|string

Type

bool|string — 缓存前缀,便于区分

$query

$query : bool|string

Type

bool|string — 请求数据,前缀后面的数据,仅key为空时有效

$token

$token : bool|string

Type

bool|string — 可自定义token,如果为false,则自动替换为当前域名!

$debug

$debug : bool

Type

bool — 开启或关闭,数据时间显示!方便调试

Methods

read()

read(false|string  $Name = false) : mixed

Parameters

false|string $Name

读取验证,可单独命名

Returns

mixed —

Return()

Return(false|string  $Name = false) : mixed

Parameters

false|string $Name

读取验证,非拦截返回

Returns

mixed —

add()

add( $Data, false  $ms = 10) : bool

Parameters

$Data
false $ms

Returns

bool —

添加缓存

del()

del(string  $prefix = '') : bool

Parameters

string $prefix

Returns

bool —

根据前缀,删除缓存

loading()

loading() : mixed

Returns

mixed —