Safe Haskell | None |
---|
Caching of Blaze HTML pages caching.
- cache :: (CacheDir c, Key key) => key -> Controller c s (Maybe Html) -> Controller c s (Maybe Text)
- cacheIf :: (CacheDir c, Key key) => Bool -> key -> Controller c s (Maybe Html) -> Controller c s (Maybe Text)
- resetCache :: (CacheDir c, Key key) => key -> Controller c s ()
- clearCache :: CacheDir c => c -> IO ()
- resetCacheModel :: (CacheDir c, Key key) => key -> Model c s ()
- viewCached :: (CacheDir c, Key key) => key -> Controller c s Html -> Controller c s ()
- class Key key where
- keyToString :: key -> FilePath
- class CacheDir config where
- getCacheDir :: config -> FilePath
Documentation
cache :: (CacheDir c, Key key) => key -> Controller c s (Maybe Html) -> Controller c s (Maybe Text)Source
Generate and save into the cache, or retrieve existing from the | cache.
cacheIf :: (CacheDir c, Key key) => Bool -> key -> Controller c s (Maybe Html) -> Controller c s (Maybe Text)Source
Cache conditionally.
resetCache :: (CacheDir c, Key key) => key -> Controller c s ()Source
Reset an item in the cache.
clearCache :: CacheDir c => c -> IO ()Source
Clear the whole cache.
resetCacheModel :: (CacheDir c, Key key) => key -> Model c s ()Source
Reset an item in the cache.
viewCached :: (CacheDir c, Key key) => key -> Controller c s Html -> Controller c s ()Source
View some HTML generator cached.
class CacheDir config whereSource
A config that can return a cache directory.
getCacheDir :: config -> FilePathSource