pamidur / aspect-injector

AOP framework for .NET (c#, vb, etc)
Apache License 2.0
770 stars 115 forks source link

Feature: Clean Cache #225

Open hchen2020 opened 1 year ago

hchen2020 commented 1 year ago

Is it possible to provide some approaches to clean the cache in MemoryCache?

pamidur commented 2 days ago

This is quite easy to do, make your own implementation of MemoryCacheBaseAttribute like this https://github.com/pamidur/aspect-injector/blob/master/aspects/Cache/MemoryCacheAttribute.cs in which expose cache controls, for example. If you'd like to contribute your implementation, I'm going to gladly accept your PR :)