on master help sign in
doc for setFileInfoCacheDuration.
commitc752eed00f202217dc5c19824a0caafa58fb8c5c authorKazu Yamamoto <kazu@iij.ad.jp> dateTue 1 Dec 2015, 14:07 (11 years ago) parente65617f
1 file changed+14−1
warp/Network/Wai/Handler/Warp.hs+14−1
warp/Network/Wai/Handler/Warp.hs+14−1
@@ -223,10 +223,23 @@ setManager x y = y { settingsManager = Just x }
223223-- Enabling this cache results in drastic performance improvement for file
224224-- transfers.
225225--
226−-- Default value: since 3.0.13, default value is 0, was previously 10
226+-- Default value: 0, was previously 10
227+--
228+-- Since 3.0.13
227229setFdCacheDuration :: Int -> Settings -> Settings
228230setFdCacheDuration x y = y { settingsFdCacheDuration = x }
229231
232+-- | Cache duration time of file information in seconds. 0 means that the cache mechanism is not used.
233+--
234+-- The file information cache is an optimization that is useful for servers dealing with
235+-- static files. However, if files are being modified, it can cause incorrect
236+-- results in some cases. Therefore, we disable it by default. If you know that
237+-- your files will be static or you prefer performance to file consistency,
238+-- it's recommended to turn this on; a reasonable value for those cases is 10.
239+-- Enabling this cache results in drastic performance improvement for file
240+-- transfers.
241+--
242+-- Default value: 0
230243setFileInfoCacheDuration :: Int -> Settings -> Settings
231244setFileInfoCacheDuration x y = y { settingsFileInfoCacheDuration = x }
232245