Add `putIfAbsent` method to LruCacheWithExpiry
This commit introduces a new `putIfAbsent` method to the
`LruCacheWithExpiry` class. The `putIfAbsent` method
creates a new entry if the key is absent or returning the
existing value if the key is already present. This addition
enhances the cache's functionality and flexibility.
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.net.module.util.LruCacheWithExpiryTest
Bug: 343260158
Change-Id: Iff03ce2b6c27fedd71510edaa6bd86885f6df122
2 files changed