CacheTower
CacheTower copied to clipboard
Support for synchronous dispose
First, thanks for opening a PR - I really appreciate it! I've had a quick look now but won't be able to give it a proper thorough review until a few days from now.
Hi James, you're welcome! I'm using your work on a project and I'm happy to help consolidating the library. I'm still working on it since I found some issues on handling manifest files on flush and on multi-threaded operations on file-based caches, but I'm still investigating on them.
I also noticed that test with external dependencies are not working, probably they're missing some service dependency/env. variable (I only checked the added tests for working)
Any update about this? Are this error may can be solved by this PR?

Hey @azhe403 - I hadn't heard anything back from the OP regarding my comments. There are now also some merge conflicts that would need to be fixed.
Generally speaking though, synchronous disposing shouldn't be required. The built-in DI stack can handle disposing of IAsyncDisposable though there is a caveat with that: If you are manually creating your own scope for DI, you need to use an AsyncServiceScope otherwise DisposeAsync won't be called.
Is there anything specific about your DI setup that isn't particularly standard? Any information you can provide that is tripping this issue would be helpful.