wai-middleware-etag-0.1.1.1: WAI ETag middleware for static files

Copyright(c) 2014 Andreas Meingast <ameingast@gmail.com>
LicenseBSD-style
Maintainerameingast@gmail.com
Stabilityexperimental
PortabilityGHC
Safe HaskellNone
LanguageHaskell98

Network.Wai.Middleware.ETag

Description

WAI ETag middleware for static files.

Synopsis

Documentation

etag :: ETagContext -> MaxAge -> Middleware Source

Attaches the middleware with a provided context.

etagWithoutCache :: MaxAge -> Middleware Source

Attaches the middleware without caching the calculated ETags.

data ETagContext Source

The configuration context of the middleware.

Constructors

ETagContext 

Fields

etagCtxUseCache :: !Bool

Set to false to disable the cache.

etagCtxMaxSize :: !Integer

File size in bytes. If files are bigger than etagCtxMaxSize, no etag will be calculated.

etagCtxCache :: !ChecksumCache

The underlying store mapping filepaths to calculated checksums.

Instances

data MaxAge Source

Maximum age that will be attached to all file-resources processed by the middleware.