refresh method

  1. @override
  2. @mustCallSuper
CacheContentType refresh()
override

Updates the cache to an updated state.

It is called either manually or via the value getter when it is accessed and the cached is considered invalid.

On SimpleCachedValue, Manually calls the compute update callback (given by the constructor) and store the result on cache.

On DependentCachedValue, Calls refresh on its child and updates the local cache of dependency.

On TimeToLiveCachedValue, Calls refresh on its child and restarts the internal Timer.

After refresh, the cache is considered valid.

The returned value should be the new cache value.

Implementation

@override
@mustCallSuper
CacheContentType refresh() => child.refresh();