class RdsStore

缓存模拟器

Methods

static mixed
seconds(string $key, mixed $value, int $second = 30)

缓存器, 随机秒数缓存器, 不在同一时刻读取值

static string
redisKey(string $type, string $key)

Redis Type Key

static mixed|null
at(string $key, string|int $index)

单KEY 存储多条数据

static bool
set(string $key, string|int $index, mixed|null $value = null)

No description

static bool
unset(string $key, string|int|array $index)

移除项目

static bool
clear(string $key)

清除

static bool
inLock(string $key, int $seconds)

原子性鉴定, 这个必须是 Redis 缓存才可生效

Details

at line 26
static mixed seconds(string $key, mixed $value, int $second = 30)

缓存器, 随机秒数缓存器, 不在同一时刻读取值

Parameters

string $key
mixed $value
int $second 秒数

Return Value

mixed

at line 52
static string redisKey(string $type, string $key)

Redis Type Key

Parameters

string $type Type
string $key Key

Return Value

string

at line 63
static mixed|null at(string $key, string|int $index)

单KEY 存储多条数据

Parameters

string $key 指定的KEY
string|int $index 索引值

Return Value

mixed|null

at line 79
static bool set(string $key, string|int $index, mixed|null $value = null)

No description

Parameters

string $key 指定的KEY
string|int $index 索引值
mixed|null $value 设置值

Return Value

bool

at line 98
static bool unset(string $key, string|int|array $index)

移除项目

Parameters

string $key 指定的KEY
string|int|array $index 索引值

Return Value

bool

at line 124
static bool clear(string $key)

清除

Parameters

string $key 清理这个KEY

Return Value

bool

at line 137
static bool inLock(string $key, int $seconds)

原子性鉴定, 这个必须是 Redis 缓存才可生效

Parameters

string $key key
int $seconds 秒数

Return Value

bool