I just found out about Guava Caching, and all the examples that I see are using map, key, and value.
Is there any way to use guava cache for an ArrayList?
I have an ArrayList that has elements, each element has 60 seconds to live, after that it should be removed, I appreciate any suggestions.
And is it possible to trigger a method after removal of each element? For example, if a number gets removed from the list I need to recalculate the average again.