I'd like to effectively implement a "soft expiry" using Hazelcast, where if an entry was beyond a certain age, it would still be considered a cache hit and returned, but it would be asynchronously reloaded after being requested (effectively, the behaviour implemented in Guava/Caffeine's Refresh operation: https://github.com/ben-manes/caffeine/wiki/Refresh)
Hazelcast IMDG doesn't seem to offer this functionality out-of-the-box. What options do I have for implementing this?
In particular, I'm interested in whether it's possible to easily implement a loader such that if the entry is missing, it will first check a database, and if the database doesn't contain a match, it'll call an API. Then the write-through behaviour should write the result of the API call back to the database and put it into the Hazelcast map.