Safe Haskell | None |
---|---|
Language | GHC2021 |
Freckle.App.Memcached.CacheKey
Synopsis
- data CacheKey
- cacheKey :: Text -> Either String CacheKey
- cacheKeyThrow :: (MonadIO m, HasCallStack) => Text -> m CacheKey
- fromCacheKey :: CacheKey -> Key
Documentation
cacheKey :: Text -> Either String CacheKey Source #
Build a CacheKey
, ensuring it's valid for Memcached
https://github.com/memcached/memcached/blob/master/doc/protocol.txt#L41
Currently the length limit of a key is set at 250 characters (of course, normally clients wouldn't need to use such long keys); the key must not include control characters or whitespace.
cacheKeyThrow :: (MonadIO m, HasCallStack) => Text -> m CacheKey Source #
Build a CacheKey
and throw if invalid
fromCacheKey :: CacheKey -> Key Source #