zhamao-framework/docs/api/ZM/Store/LightCache.md

182 lines
2.3 KiB
Markdown
Raw Normal View History

2022-03-27 16:42:36 +08:00
# ZM\Store\LightCache
## init
```php
2022-04-02 17:31:48 +00:00
public function init(array $config): bool|mixed
2022-03-27 16:42:36 +08:00
```
### 描述
作者很懒,什么也没有说
### 参数
| 名称 | 类型 | 描述 |
| -------- | ---- | ----------- |
2022-04-02 17:31:48 +00:00
| config | array | 配置 |
2022-04-01 18:48:48 +08:00
2022-03-27 16:42:36 +08:00
### 返回
| 类型 | 描述 |
| ---- | ----------- |
2022-04-02 17:31:48 +00:00
| bool|mixed | 返回失败false或创建SwooleTable成功结果 |
2022-03-27 16:42:36 +08:00
## get
```php
public function get(string $key): null|mixed
```
### 描述
作者很懒,什么也没有说
### 参数
| 名称 | 类型 | 描述 |
| -------- | ---- | ----------- |
| key | string | |
2022-04-01 18:48:48 +08:00
2022-03-27 16:42:36 +08:00
### 返回
| 类型 | 描述 |
| ---- | ----------- |
| null|mixed | |
## getExpire
```php
public function getExpire(string $key): null|mixed
```
### 描述
作者很懒,什么也没有说
### 参数
| 名称 | 类型 | 描述 |
| -------- | ---- | ----------- |
| key | string | |
2022-04-01 18:48:48 +08:00
2022-03-27 16:42:36 +08:00
### 返回
| 类型 | 描述 |
| ---- | ----------- |
| null|mixed | |
## getExpireTS
```php
public function getExpireTS(string $key): null|mixed
```
### 描述
作者很懒,什么也没有说
### 参数
| 名称 | 类型 | 描述 |
| -------- | ---- | ----------- |
| key | string | |
2022-04-01 18:48:48 +08:00
2022-03-27 16:42:36 +08:00
### 返回
| 类型 | 描述 |
| ---- | ----------- |
| null|mixed | |
## set
```php
public function set(array|int|string $value, string $key, int $expire): bool
```
### 描述
作者很懒,什么也没有说
### 参数
| 名称 | 类型 | 描述 |
| -------- | ---- | ----------- |
| value | array|int|string | |
| key | string | |
| expire | int | |
2022-04-01 18:48:48 +08:00
2022-03-27 16:42:36 +08:00
### 返回
| 类型 | 描述 |
| ---- | ----------- |
| bool | |
## update
```php
public function update(mixed $value, string $key): bool
```
### 描述
作者很懒,什么也没有说
### 参数
| 名称 | 类型 | 描述 |
| -------- | ---- | ----------- |
| value | mixed | |
| key | string | |
2022-04-01 18:48:48 +08:00
2022-03-27 16:42:36 +08:00
### 返回
| 类型 | 描述 |
| ---- | ----------- |
| bool | |
## isset
```php
public function isset(string $key): bool
```
### 描述
作者很懒,什么也没有说
### 参数
| 名称 | 类型 | 描述 |
| -------- | ---- | ----------- |
| key | string | |
2022-04-01 18:48:48 +08:00
2022-03-27 16:42:36 +08:00
### 返回
| 类型 | 描述 |
| ---- | ----------- |
| bool | |
## savePersistence
```php
public function savePersistence(): mixed
```
### 描述
这个只能在唯一一个工作进程中执行
### 返回
| 类型 | 描述 |
| ---- | ----------- |
| mixed | |