@@ -37,9 +37,9 @@ import qualified Network.Wai.Middleware.Push.Referer.LimitMultiMap as M
3737-- this function should return 'Just'.
3838-- If 'Nothing' is returned,
3939-- the middleware learns nothing.
40−type MakePushPromise = URLPath -- ^ path in referer
41− -> URLPath -- ^ path to be pushed
42− -> FilePath -- ^ file to be pushed
40+type MakePushPromise = URLPath -- ^ path in referer (key: /index.html)
41+ -> URLPath -- ^ path to be pushed (value: /style.css)
42+ -> FilePath -- ^ file to be pushed (file_path/style.css)
4343 -> IO (Maybe PushPromise)
4444
4545-- | Type for URL path.
@@ -65,7 +65,12 @@ settings = defaultReaperSettings {
6565
6666-- | The middleware to push files based on Referer:.
6767-- Learning strategy is implemented in the first argument.
68−-- Learning information is kept for 30 seconds.
68+--
69+-- Cache of learning information is kept for 30 seconds
70+-- and cleared completely.
71+-- Max number of keys (e.g. index.html) is 20.
72+-- Max number of values (e.g. style.css) for each key is 20.
73+-- These numbers are hard-coded at this moment.
6974pushOnReferer :: MakePushPromise -> Middleware
7075pushOnReferer func app req sendResponse = app req push
7176 where