CacheConfig class
Configuration for caching a networking request.
Constructors
- CacheConfig({Duration duration = const Duration(minutes: 5), bool forceRefresh = false, String? key})
-
Creates a CacheConfig.
const
Properties
- duration → Duration
-
The duration for which the response should be cached.
Defaults to 5 minutes.
final
- forceRefresh → bool
-
Whether to force a refresh of the cache.
If true, the request will be made even if a cached response exists.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → String?
-
An optional custom key for the cache.
If not provided, the request URI and parameters will be used.
final
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true, thetoStringmethod will be overridden to output this instance'sprops.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