http_cache_client library

Classes

BackupCacheStore
A store saving responses in a dedicated primary store and secondary store.
CacheCipher
CacheClient
http.Client caching responses with HttpCache.
CacheContentSink
Content of an entry being written by StreamingCacheStore.openWrite.
CacheControl
Cache-Control header subset representation
CacheLookup
Result of HttpCache.lookup.
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.
HttpCache
HTTP cache exposed as steps around a send.
HttpDate
MemCacheStore
A store saving responses in a dedicated memory LRU map.
StreamingCacheStore
A store that reads and writes content as a stream.
StreamingEntry
An entry of a StreamingCacheStore at the time it was read.

Enums

CachePolicy
Policy to handle request behaviour.
CachePriority
Cache priority.

Constants

ageHeader → const String
cacheControlHeader → const String
conditionalRequestHeaders → const List<String>
contentLocationHeader → const String
contentTypeHeader → const String
dateHeader → const String
etagHeader → const String
expiresHeader → const String
ifModifiedSinceHeader → const String
ifNoneMatchHeader → const String
jsonContentType → const String
lastModifiedHeader → const String
revalidationHeaders → const List<String>
Headers refreshed from a 304 response.
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.
touchMaxStale(CacheResponse entry, CacheOptions options, CacheStore store, {StreamingEntry? streamed}) → Future<CacheResponse>
Extends the entry lifetime by CacheOptions.maxStale.

Typedefs

CacheKeyBuilder = String Function({Object? body, Map<String, String>? headers, required Uri url})
Key builder to customize keys.
CacheOptionsResolver = CacheOptions? Function(BaseRequest request)
Resolves cache options for a request sent through CacheClient.send.
Decrypt = Future<List<int>> Function(List<int> bytes)
Decrypt content/headers method.
Encrypt = Future<List<int>> Function(List<int> bytes)
Encrypt content/headers method.