Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data CacheContainer = forall r . CacheBackend r => CacheContainer r
- class CacheApp a where
- getCacheContainer :: a -> CacheContainer
- class CacheBackend c where
- backendCachePut :: (CacheApp a, MonadIO m) => Text -> BS.ByteString -> Integer -> c -> WhebT a b m ()
- backendCacheGet :: (CacheApp a, MonadIO m) => Text -> c -> WhebT a b m (Maybe BS.ByteString)
- backendCacheDelete :: (CacheApp a, MonadIO m) => Text -> c -> WhebT a b m ()
- setCacheValue :: (CacheApp a, MonadIO m) => Text -> BS.ByteString -> WhebT a b m ()
- setCacheValue' :: (CacheApp a, MonadIO m) => Text -> BS.ByteString -> Integer -> WhebT a b m ()
- getCacheValue :: (CacheApp a, MonadIO m) => Text -> WhebT a b m (Maybe BS.ByteString)
- getCacheValue' :: (CacheApp a, MonadIO m) => BS.ByteString -> Text -> WhebT a b m BS.ByteString
- deleteCacheValue :: (CacheApp a, MonadIO m) => Text -> WhebT a b m ()
Documentation
data CacheContainer Source
forall r . CacheBackend r => CacheContainer r |
getCacheContainer :: a -> CacheContainer Source
class CacheBackend c where Source
backendCachePut :: (CacheApp a, MonadIO m) => Text -> BS.ByteString -> Integer -> c -> WhebT a b m () Source
backendCacheGet :: (CacheApp a, MonadIO m) => Text -> c -> WhebT a b m (Maybe BS.ByteString) Source
backendCacheDelete :: (CacheApp a, MonadIO m) => Text -> c -> WhebT a b m () Source
CacheBackend CacheData | In memory cache backend. Cache value will not persist after server restart and will never clear old values. |
setCacheValue :: (CacheApp a, MonadIO m) => Text -> BS.ByteString -> WhebT a b m () Source
Set a cache value with an expiration of an hour
setCacheValue' :: (CacheApp a, MonadIO m) => Text -> BS.ByteString -> Integer -> WhebT a b m () Source
Set a cache value with expiration in seconds
getCacheValue :: (CacheApp a, MonadIO m) => Text -> WhebT a b m (Maybe BS.ByteString) Source
getCacheValue' :: (CacheApp a, MonadIO m) => BS.ByteString -> Text -> WhebT a b m BS.ByteString Source
deleteCacheValue :: (CacheApp a, MonadIO m) => Text -> WhebT a b m () Source