Skip to main content

set_json

Function set_json 

Source
pub async fn set_json(
    redis: &RedisCache,
    key: &str,
    bytes: &[u8],
    ttl_secs: u64,
)
Expand description

Redis 写入:只写响应 JSON 字节。

§参数

  • redis: Redis 缓存客户端
  • key: 逻辑缓存键
  • bytes: 预序列化 JSON 字节
  • ttl_secs: Redis 过期秒数