Closed murseld closed 2 years ago
Hi @murseld , Aspect with Kind.Around effectively override any other kind. But you can use multiple Kind.Around aspects. Don't forget to set Injection.Priority
For these to work you need to implement all of yours concurrent aspects as Kind.Around.
I'll leave this issue opened as I think I could come up with how to make priorities "cross-kind" e.g. make all Before and After as part of another internal Around.
Hey @murseld , I have recently implemented Cache aspect. Could you please take a look and see if it can suit your needs? https://github.com/pamidur/aspect-injector/tree/master/samples/src/Cache
I'm asking as you're the one with real cache problem need to solve. Would be great if you take a look :)
Hi pamidur it was great. thank you very much...
Hi @murseld , I've created new prerelease 2.4.0-beta1. I changed weavers priority in it. So Before/After are always injected even when other aspect with Around is used. You may try it!
Should be fixed now. Please feel free to reopen
Hello pamidur and me again :)
When I want to use multiple aspect for example CacheAspect and LogAspect, CacheAspect (if cache contains any data) prevents the other LogAspect from using the Kind.After property because log aspect is logging when method is complete.
How can I avoid this do you have any advice. Thank you my friend..
CacheAspect.txt LogAspect.txt