| Copyright | (c) 2014 Andreas Meingast <ameingast@gmail.com> |
|---|---|
| License | BSD-style |
| Maintainer | ameingast@gmail.com |
| Stability | experimental |
| Portability | GHC |
| Safe Haskell | None |
| Language | Haskell98 |
Network.Wai.Middleware.ETag
Description
WAI ETag middleware for static files.
- etag :: ETagContext -> MaxAge -> Middleware
- etagWithoutCache :: MaxAge -> Middleware
- defaultETagContext :: Bool -> IO ETagContext
- data ETagContext = ETagContext {}
- data MaxAge
- type ChecksumCache = MVar (HashMap FilePath ByteString)
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.
defaultETagContext :: Bool -> IO ETagContext Source
Create an empty ETagContext.
data ETagContext Source
The configuration context of the middleware.
Constructors
| ETagContext | |
Fields
| |
Instances
Maximum age that will be attached to all file-resources processed by the middleware.
Constructors
| NoMaxAge | |
| MaxAgeSeconds Int | |
| MaxAgeForever |
type ChecksumCache = MVar (HashMap FilePath ByteString) Source