Skip to main content

Module response

Module response 

Source
Expand description

Cacheable response types and traits.

This module provides types for working with cacheable responses:

§CacheableResponse Trait

The CacheableResponse trait defines how response types are converted to and from their cached representation. This allows responses to be stored efficiently in cache backends.

§Cache States

Cached data can be in three states:

§Result Handling

This module provides a blanket implementation of CacheableResponse for Result<T, E> where T: CacheableResponse. This allows error responses to pass through uncached while successful responses are cached.

Enums§

CacheState
Freshness state of cached data.

Traits§

CacheableResponse
Trait for response types that can be cached.

Type Aliases§

ResponseCachePolicy
Cache policy for responses.