Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data MemcachedClient
- newMemcachedClient :: MonadIO m => MemcachedServers -> m MemcachedClient
- withMemcachedClient :: MonadUnliftIO m => MemcachedServers -> (MemcachedClient -> m a) -> m a
- memcachedClientDisabled :: MemcachedClient
- class HasMemcachedClient env where
- memcachedClientL :: Lens' env MemcachedClient
- get :: (MonadUnliftIO m, MonadTracer m, MonadReader env m, HasMemcachedClient env) => CacheKey -> m (Maybe Value)
- set :: (MonadUnliftIO m, MonadTracer m, MonadReader env m, HasMemcachedClient env) => CacheKey -> Value -> CacheTTL -> m ()
- delete :: (MonadUnliftIO m, MonadTracer m, MonadReader env m, HasMemcachedClient env) => CacheKey -> m ()
Documentation
data MemcachedClient Source #
Instances
newMemcachedClient :: MonadIO m => MemcachedServers -> m MemcachedClient Source #
withMemcachedClient :: MonadUnliftIO m => MemcachedServers -> (MemcachedClient -> m a) -> m a Source #
class HasMemcachedClient env where Source #
memcachedClientL :: Lens' env MemcachedClient Source #
Instances
get :: (MonadUnliftIO m, MonadTracer m, MonadReader env m, HasMemcachedClient env) => CacheKey -> m (Maybe Value) Source #
set :: (MonadUnliftIO m, MonadTracer m, MonadReader env m, HasMemcachedClient env) => CacheKey -> Value -> CacheTTL -> m () Source #
Set a value to expire in the given seconds
Pass 0
to set a value that never expires.
delete :: (MonadUnliftIO m, MonadTracer m, MonadReader env m, HasMemcachedClient env) => CacheKey -> m () Source #
Delete a key