Open umar-ulabs opened 2 years ago
@umar-ulabs Thanks for your interest in this project.
Could you show us why you need this method on IHybridCache
?
IEasyCachingProvider has a method "GetByPrefixAsync" but IHybridCachingProvider doesn't. Since I am using IHybridCachingProvider as layered(in memory and redis) caching, I had to change the core feature of my application. I had read somewhere that there was "GetByPrefixAsync" on IHybridCachingProvider interface but was remove in version 0.5 or something. Is there a way to bring it back?
After v0.5.0, IHybridCachingProvider was redesigned and we have found that few people have a demand for this method, so we remove it.
BTW, in design, if the local cache hits, the result is directly returned.
If the prefix is used to obtain the data, it should be considered that if the number of local caches is less than the number of distributed caches, incomplete data may be obtained at this time.
for now I am just getting items one by one, I hope it doesn't cause any problems
`
var items = new List
foreach (var key in keys)
{
var data = await _cacheManager.GetAsync<V>(key);
if (data != null && data.Value != null)
{
items.Add(data.Value);
}
}
return items;`
I need this method. It is necessary to obtain all data stored with a specific prefix in the key
I am in dare need of the GetByPrefix method on IHybridCache, how can I add it back. I learned it was removed from 0.5 version. Please help.