✨ feat(tsl-api-reference): expand API and module coverage
This commit is contained in:
@@ -31,6 +31,36 @@ echo cached_data[0], ",", cached_data[1], ",", cached_data[2], "\n";
|
||||
// 1,2,3
|
||||
```
|
||||
|
||||
## `checkGlobalCacheExpired(value, expire_time)`
|
||||
|
||||
声明:function
|
||||
|
||||
检查全局缓存引用是否因同名缓存被重置而过期
|
||||
|
||||
<!-- tags: 全局缓存 过期 重置 引用 状态 检查 cache expired -->
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| ------------- | ---------- | ---------------------------- |
|
||||
| `value` | object | 要检查的全局缓存引用 |
|
||||
| `expire_time` | t_datetime | 可选。输出缓存引用的过期时间 |
|
||||
|
||||
返回:boolean
|
||||
|
||||
### 示例
|
||||
|
||||
范例01:检查重置前后的缓存引用
|
||||
|
||||
```tsl
|
||||
key := "PB_DOC_GLOBAL_CACHE_EXPIRED";
|
||||
setGlobalCache(key, array(1));
|
||||
getGlobalCache(key, cache_ref);
|
||||
before := checkGlobalCacheExpired(cache_ref, expire_time);
|
||||
setGlobalCache(key, array(2));
|
||||
after := checkGlobalCacheExpired(cache_ref);
|
||||
echo before, ",", after, "\n";
|
||||
// 输出:0,1
|
||||
```
|
||||
|
||||
## `GetGlobalCacheInfo(value)`
|
||||
|
||||
声明:function
|
||||
|
||||
Reference in New Issue
Block a user