dio_http_cache library

Classes

CacheConfig
DioCacheManager

Constants

DIO_CACHE_KEY_FORCE_REFRESH → const String
"dio_cache_force_refresh"
DIO_CACHE_KEY_MAX_AGE → const String
"dio_cache_max_age"
DIO_CACHE_KEY_MAX_STALE → const String
"dio_cache_max_stale"
DIO_CACHE_KEY_PRIMARY_KEY → const String
"dio_cache_primary_key"
DIO_CACHE_KEY_SUB_KEY → const String
"dio_cache_sub_key"
DIO_CACHE_KEY_TRY_CACHE → const String
"dio_cache_try_cache"

Functions

buildCacheOptions(Duration maxAge, { Duration maxStale, String primaryKey, String subKey, Options options, bool forceRefresh }) Options
build a normal cache options
buildConfigurableCacheOptions({Options options, Duration maxAge, Duration maxStale, String primaryKey, String subKey, bool forceRefresh }) Options
if null==maxAge, will try to get maxAge and maxStale from response headers. local settings will always overview the value get from service.
buildServiceCacheOptions({Options options, Duration maxStale, String primaryKey, String subKey, bool forceRefresh }) Options
try to get maxAge and maxStale from response headers. local settings will always overview the value get from service.

Typedefs

Decrypt(String str) → Future<String>
Encrypt(String str) → Future<String>