Module kvarn::comprash

source ·
Expand description

Compress and cache.

Provides the MokaCache 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.




  • The HTTP date time format in the [time] format.


  • Checks mime if the content should be compressed; heuristically checks for compressed formats.
  • Guesses the mime. file_contents should be < 16 bytes.
  • Heuristically checks mime for UTF-8 text formats.

Type Definitions