Add removal listener + build on local cache module #442
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I need to know when an item is remove from the cache, so I add the possibility to put an listener in the
MemoryPolicy
wich be add to theCacheBuilder
There are 2 point where I need your advice
RemovalCause
in theRemovalNotification
but actually the project is base on cache3 host on GitHub, not in the local module of cache. We can't make PR on this project it deprecated and in read only. So I have remove this repo and use directly the local code of cache to be able to maintaindestroy
function in theStore
call by the user or use the coroutine scope and catch when an Cancellable are emit to remove the listenerI'm very interested in hearing your opinions on this.