getExpiryForAccess method Null safety

  1. @override
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 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


Duration? getExpiryForAccess() {
  // Accessing a cache entry has no affect on the current expiry duration
  return null;