Safe Haskell | None |
---|---|
Language | Haskell2010 |
Middleware for server push learning dependency based on Referer:.
Synopsis
- pushOnReferer :: Settings -> Middleware
- type URLPath = ByteString
- type MakePushPromise = URLPath -> URLPath -> FilePath -> IO (Maybe PushPromise)
- defaultMakePushPromise :: MakePushPromise
- data Settings
- defaultSettings :: Settings
- makePushPromise :: Settings -> MakePushPromise
- duration :: Settings -> Int
- keyLimit :: Settings -> Int
- valueLimit :: Settings -> Int
Middleware
pushOnReferer :: Settings -> Middleware Source #
The middleware to push files based on Referer:. Learning strategy is implemented in the first argument.
Making push promise
type URLPath = ByteString Source #
Type for URL path.
type MakePushPromise Source #
defaultMakePushPromise :: MakePushPromise Source #
Learn if the file to be pushed is CSS (.css) or JavaScript (.js) file.
Settings
defaultSettings :: Settings Source #
Default settings.
makePushPromise :: Settings -> MakePushPromise Source #
Default: defaultMakePushPromise
keyLimit :: Settings -> Int Source #
Max number of keys (e.g. index.html) in the learning information. Default: 20
valueLimit :: Settings -> Int Source #
Max number of values (e.g. style.css) in the learning information. Default: 20