github.com/GuanceCloud/cliutils@v1.1.21/pipeline/ptinput/funcs/md/cache_set.md (about) 1 ### `cache_set()` {#fn-cache-set} 2 3 函数原型:`fn cache_set(key: str, value: str, expiration: int) nil` 4 5 函数说明:将键值对保存到 cache 中 6 7 参数: 8 9 - `key`:键(必填) 10 - `value`:值(必填) 11 - `expiration`:过期时间(默认=100s) 12 13 示例: 14 15 ```python 16 a = cache_set("a", "123") 17 a = cache_get("a") 18 add_key(abc, a) 19 ```