CacheStrategyFactory class
A factory class for creating cache strategies based on HTTP requests and responses.
Constructors
- CacheStrategyFactory({required BaseRequest request, required CacheOptions cacheOptions, BaseResponse? response, CacheResponse? cacheResponse})
- Constructor for the CacheStrategyFactory.
Properties
- cacheOptions → CacheOptions
-
Options that dictate caching behavior.
final
- cacheResponse → CacheResponse?
-
The cached response, if available.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- request → BaseRequest
-
The HTTP request to be processed.
final
- response → BaseResponse?
-
The HTTP response received, if any.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
compute(
{Future< CacheResponse> cacheResponseBuilder()?}) → Future<CacheStrategy> - Computes a cache strategy based on the current request and response.
-
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
-
allowedStatusCodes
→ const List<
int>