jhalterman / expiringmap

A high performance thread-safe map that expires entries
Apache License 2.0
1k stars 142 forks source link

[FEATURE] ExpiringMap builder method to configure the map not to accept null values #79

Open rohit5ram opened 2 years ago

rohit5ram commented 2 years ago

I need to use an expiring map with a default expiration. It caches the data fetched from a remote server. If the device is offline, then it's storing the null as a valid value for the key. The expiry duration getting applied for the null value. When the device is back online, the data not getting refreshed until the expiration.