jaemk / cached

Rust cache structures and easy function memoization
MIT License
1.57k stars 95 forks source link

Redis cache doesn't support patterns #205

Closed rtiagom closed 7 months ago

rtiagom commented 7 months ago

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;
rtiagom commented 7 months ago

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