Skip to content

Selecting cache key starting with something? #66

Closed
@dotnetshadow

Description

@dotnetshadow

Great library,

I was wondering is there a way to remove cache key based on a selector such as remove all keys starting with "product-id-" ?

As similar question was asked here:
#6

Looking for something like below, but for .net core

 {
            var cacheKeys = _cachingService.ObjectCache.Where(kvp => kvp.Key.Equals("MyCacheKey"))
                .Select(kvp => kvp.Key);
            foreach (var cacheKey in cacheKeys)
            {
                _cachingService.ObjectCache.Remove(cacheKey);
            }
        }

Also is the a feature where a cache object can be dependent on another cache object.
i.e. Cache A has a dependency on Cache B (when it's cleared), I would like cache a to be cleared too

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions