Skip to main content

cached_query

Function cached_query 

Source
pub async fn cached_query<T, E, F>(
    cache_key: &str,
    expiry_seconds: u64,
    func: F,
) -> Result<T, E>
where T: Serialize + DeserializeOwned + Send + Sync + 'static, E: From<RedisError> + From<Error> + Send + 'static, F: Future<Output = Result<T, E>> + Send,