DioCacheConfiguration class
DioCacheConfiguration provides a centralized configuration for Dio's cache interceptors.
This configuration serves as the primary point to control the behavior of caching within the Dio HTTP client across the application. The settings defined here can be dynamically altered based on the app's requirements.
Constructors
Properties
- 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
Static Properties
- maxStale ↔ Duration
-
Specifies the duration after which the cached response is considered stale.
After this duration, the cache will no longer be used and a fresh network request will be made.
getter/setter pair
- useCacheInterceptor ↔ bool
-
Determines if the cache interceptor should be used.
getter/setter pair