logo
Expand description

Compress and cache.

Provides the Cache for Kvarn. When a response is made cacheable, several important headers are appended. See FatResponse for more info.

The main type in this module is CompressedResponse, a dynamically compressed response receiving correct headers and extensions.

Structs

A general cache with size and item count limits.

A response with a lazily compressed body.

Some options for how to compress the response.

A path an optional query used in UriKey

Enums

Output of cache operations.

Error in parsing cache preference.

Automatically add cache-control header to response.

The preference of compression in CompressedResponse.

The preferred compression algorithm.

The preference for caching the item on the server.

A key for an Uri used in ResponseCache.

Statics

The HTTP date time format in the time format.

Functions

Checks mime if the content should be compressed; heuristically checks for compressed formats.

Type Definitions

The item used in the cache. T represents the cached data.

A Cache inside a Mutex with appropriate type parameters for a file cache.

A Cache inside a Mutex with appropriate type parameters for a response cache.