StorageCacheTime constructor

const StorageCacheTime(
  1. Duration duration
)

A cache time that will be used to determine when the data should be deleted.

It is discouraged to "forever persist" state, as this can lead to a form of memory leak. If a provider was to be persisted forever then deleted from the application's source code, the data would still be present in the database of existing users.

If you want to forever persist state, you will have to manually deal with database migration to gracefully handle those edge-cases.

Implementation

const StorageCacheTime(Duration this.duration);