api_client_cache 1.0.0 api_client_cache: ^1.0.0 copied to clipboard
A simple HTTP cache for api_client
api_client #
A HTTP Cache transporter for api_client
How to use #
import 'package:api_client/api_client.dart';
import 'package:api_client_cache/api_client_cache.dart';
final Spec spec = Spec(
transporter: HttpCacheTransporter(expiresIn: 15000)
// other configuration
);
Arguments #
onlyGET
apply caching forGET
request only (default istrue
)expiresIn
set time to live (in milliseconds) for cache entry (default is15000
)transporter
set custom transporter rather thanTransporter.factory()