getExpiryForAccess method Null safety

Duration? getExpiryForAccess()

Gets the Duration before an accessed CacheEntry is considered expired.

This method is called by a caching implementation after a CacheEntry is accessed to determine the Duration before an entry expires. If a Duration.zero is returned a CacheEntry will be considered immediately expired. Returning null will result in no change to the previously understood expiry Duration

Returns the new Duration before an accessed entry expires

Implementation

Duration? getExpiryForAccess();