getCachedOrNetwork<T> abstract method
Gets a cached response from the specified path
or network response if cache miss or expired.
Implementation
Future<Result<T>> getCachedOrNetwork<T>(
String path, {
Map<String, dynamic>? queryParameters, // Optional query parameters
FutureOr<T> Function(dynamic data)? onSuccess, // Callback on success
FutureOr<T> Function(dynamic data)? onError, // Callback on error
RestApiClientRequestOptions? options, // Request options
Duration?
cacheLifetimeDuration, // Lifetime of cached data, defaults to CacheOptions.cacheLifetimeDuration
});