ContentsIndex
Framework.Cache.Cache
Description
This module contains common cache functions
Synopsis
initCache :: MPool CacheConnection -> (String, String) -> IO (Int, CacheConnection)
cGet :: Serializable v => CacheConnection -> String -> IO (Maybe v)
cPut :: Serializable v => CacheConnection -> String -> v -> IO Bool
cUnset :: CacheConnection -> String -> IO Bool
cFree :: MPool CacheConnection -> Int -> CacheConnection -> IO ()
cDisconnect :: CacheConnection -> IO ()
Documentation
initCache
:: MPool CacheConnectionPool of cache connections
-> (String, String)(cache backend, cache path)
-> IO (Int, CacheConnection)(Index in the pool, connection)
Get connection to cache backend. Backend type is given in second argument, i.e. : initCache pool (memcached, localhost:11211).
cGet :: Serializable v => CacheConnection -> String -> IO (Maybe v)
Get data from cache (from given connection)
cPut :: Serializable v => CacheConnection -> String -> v -> IO Bool
Put data to cache
cUnset :: CacheConnection -> String -> IO Bool
Unset key in cache
cFree
:: MPool CacheConnectionPool of connections
-> IntIndex in the pool
-> CacheConnectionConnection
-> IO ()
Free cache backend
cDisconnect :: CacheConnection -> IO ()
Actually disconnect from cache
Produced by Haddock version 2.4.2