jaemk / cached

Rust cache structures and easy function memoization

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Redis cache doesn't support patterns

rtiagom opened this issue · comments

I was expecting this to work:

    AsyncRedisCache::<String, String>::new("app_cache", 1800)
        .set_refresh(true)
        .set_connection_string(redis_url.as_str())
        .build().await
        .expect("error building example redis cache")
            let cache = get_cache().await;
            let key = format!("filter-section-symbol_json-*-{}", current_user_screener.id);
            let _ = cache.cache_remove(&key).await;

I posted this too soon. It seems redis doesn't support wildcard.