pub async fn write_through_async<F, Fut>(
cache: &dyn Cache,
key: &str,
value: Vec<u8>,
ttl: Option<Duration>,
writer: F,
) -> Result<(), CacheError>Expand description
Write-through(异步版):同时写入缓存和异步后端存储
写入顺序:先写后端存储,再写缓存。若后端存储写入失败,不写缓存。