A CacheAspect That Supports Async Method (Even Generics) #238
bleesteady
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey guys. I struggled with this for some time, and I didn't see any great solutions to handle async methods with an "Around" Advice. But this seems to do the trick. I hope this helps somebody else out!
`[AspectInjector.Broker.Aspect(Scope.Global)]
[Injection(typeof(CacheAspect))]
public class CacheAspect : Attribute
{
private static IDistributedCache _cache;
}`
Beta Was this translation helpful? Give feedback.
All reactions