Skip to main content

Module http_cache

Module http_cache 

Source
Expand description

A memory cache implementing the logic specified in http://tools.ietf.org/html/rfc7234 and http://tools.ietf.org/html/rfc7232.

Structs§

CacheKey
The key used to differentiate requests in the cache.
CachedResource
A complete cached resource.
HttpCache
A simple memory cache. Elements will be evicted based on the cache heuristic. We weight elements by the number of entries per given url. We evict currently a whole url. The cache makes extensive use of Arc::unwrap_or_clone or and Arc::into_inner to modify the cached entries. This is ok because CachedResource are cheap to clone
MemoryCacheLifecycle
The lifecycle hooks of the HttpCache. Responsible for moving data to the disk.

Enums§

CachedResourcesOrGuard
Returns an writeable entry into the cache or a guard for insertint an entry The guard will block other queries to the cache entry in both cases.
HttpCacheAssignment
Is this state assigned to the private or public side.
ValidationStatus
Whether a cached response is fresh or requires validation before or after use.

Functions§

refresh
Freshening Stored Responses upon Validation. https://tools.ietf.org/html/rfc7234#section-4.3.4