Crate http_cache_stream

Source
Expand description

An implementation of an HTTP response cache that uses http-cache-semantics.

Inspired by the http-cache crate.

This crate’s implementation differs significantly from http-cache in the following ways:

  • Response bodies are not fully read into memory.
  • Response bodies may be linked directly from cache storage.
  • Uses its own lightweight storage implementation (instead of cacache), by default.
  • This library is not nearly as customizable as http-cache.

By default, this crate uses tokio as its async runtime.

Enable the smol feature for using the smol runtime instead.

Re-exports§

pub use http;
pub use http_body;
pub use http_cache_semantics as semantics;

Modules§

lock
Implementation of advisory file locking.
storage
Implementation of cache storage.

Structs§

Body
Represents a response body from the HTTP cache.
Cache
Implement a HTTP cache.

Enums§

CacheLookupStatus
Represents a basic cache lookup status.
CacheStatus
Represents a cache status.

Constants§

X_CACHE
The name of the x-cache custom header.
X_CACHE_DIGEST
The name of the x-cache-digest custom header.
X_CACHE_LOOKUP
The name of the x-cache-lookup custom header.

Traits§

HttpBody
Represents the supported HTTP body trait from middleware integrations.
Request
An abstraction of an HTTP request.