CacheHandler class

A class for managing cached data to optimize API request handling.

Constructors

CacheHandler({required LoggingOptions loggingOptions, required CacheOptions cacheOptions})

Properties

cacheOptions → CacheOptions
final
hashCode → int
The hash code for this object.
no setterinherited
loggingOptions → LoggingOptions
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() → Future<void>
Clears all cached data.
get(RequestOptions options) → Future
Retrieves cached data for the given request options. Returns null if no valid cached data is found.
init() → Future
Initializes the cache handler, clearing the storage if configured to do so.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
set(Response response, [Duration? cacheLifetimeDuration]) → Future<void>
Caches the response data from a request.
toString() → String
A string representation of this object.
inherited

Operators

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