Wicked. The way we did it originally doesn't *seem* to go slow at all.
In fact our app is lightening-fast. But I agree that it's a lot of
overhead and your way of doing it is better.
That said, will adding the put() with TTL slow things down? I imagine
that currently what you do for each map is:
1. Get its TTL from MapConfig FOR ALL ELEMENTS IN MAP
2. Iterate over each of the Map's elements
3. Get each one's creationTime
4. If current time - creationTime > TTL ==> remove/evict
But if each element can have a distinct TTL you'll have to do step 1
(get TTL) for each element, not just once for the whole Map.
Will this not slow things down? Or am I wrong about how the code
works? Either way, you know more than I do about how Hazelcast works,
I guess if it's not doable, you won't do it. :)
Cheers,
Bob