StorageCacheTime class final

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.

Constructors

StorageCacheTime.new(Duration duration)
A cache time that will be used to determine when the data should be deleted.
const

Properties

duration Duration?
The time before the data expires.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

unsafe_forever → const StorageCacheTime
A cache time that will never expire.