dio_cache_interceptor library

Classes

BackupCacheStore
A store saving responses in a dedicated primary store and secondary store.
BaseRequest
Abtract request adapter
BaseResponse
Abtract response adapter
CacheCipher
CacheControl
Cache-Control header subset representation
CacheOptions
Options to apply to handle request and cache behaviour.
CacheResponse
Response representation from cache store.
CacheStore
Definition of store
CacheStrategy
Cache strategy result containing either a request or a cached response but not both.
CacheStrategyFactory
A factory class for creating cache strategies based on HTTP requests and responses.
DioCacheInterceptor
Cache interceptor
HttpDate
MemCacheStore
A store saving responses in a dedicated memory LRU map.

Enums

CachePolicy
Policy to handle request behaviour.
CachePriority
Cache priority.

Constants

ageHeader → const String
cacheControlHeader → const String
contentLocationHeader → const String
contentTypeHeader → const String
dateHeader → const String
etagHeader → const String
expiresHeader → const String
extraCacheKey → const String
Cache key available in Response
extraFromNetworkKey → const String
Available in Response if coming from network.
extraKey → const String
extraRequestSentDateKey → const String
Available in RequestOptions to know when request has been sent.
ifModifiedSinceHeader → const String
ifNoneMatchHeader → const String
jsonContentType → const String
lastModifiedHeader → const String
varyHeader → const String

Properties

token RegExp
An HTTP token.
final
whitespace RegExp
A regular expression matching any number of _lws productions in a row.
final

Functions

getDateHeaderValue(String? headerValue) DateTime?
getExpiresHeaderValue(String? headerValue) DateTime?
isCacheCheckAllowed(int? statusCode, CacheOptions cacheOptions) bool
Checks if we can try to resolve cached response against given statusCode and cacheOptions.

Typedefs

CacheKeyBuilder = String Function({Object? body, Map<String, String>? headers, required Uri url})
Key builder to customize keys.
Decrypt = Future<List<int>> Function(List<int> bytes)
Decrypt content/headers method.
Encrypt = Future<List<int>> Function(List<int> bytes)
Encrypt content/headers method.