llowrey wrote:Hi Larkin,
I understand that Eviction is not supported by ramjournal-scheme or flashjournal-scheme.
We have a cache that is currently ~300GB in total heap across the cluster and we add several hundred thousand new entries every day averaging ~16KB per entry. We currently use local-scheme's eviction policy to control the size of the cache.
We would like to use Elastic Data to grow the cache to a couple of terabytes but since eviction is not supported we would need another way to keep the size of the cache constrained. I have been pondering running a weekly job to purge old entries but I'm not sure how to go about it.
Our entry keys encode the data we need in order to decide which entries should be evicted. Would it be reasonable to call keySet with a filter that would select those keys which should be evicted? The total number of entries would be on the order of 100 million and the matching key set, if run weekly, would be ~2 million. The javadoc says the resulting set may not be backed by the Map so calling clear() won't do the trick. Also, the NamedCache doesn't seem to have a removeAll() method so that's out.
Any advice would be greatly appreciated.