module Database.Persist.SqlBackend.Internal.StatementCache where
import Data.Text (Text)
import Database.Persist.SqlBackend.Internal.Statement
data StatementCache = StatementCache
{ StatementCache -> StatementCacheKey -> IO (Maybe Statement)
statementCacheLookup :: StatementCacheKey -> IO (Maybe Statement)
, StatementCache -> StatementCacheKey -> Statement -> IO ()
statementCacheInsert :: StatementCacheKey -> Statement -> IO ()
, StatementCache -> IO ()
statementCacheClear :: IO ()
, StatementCache -> IO Int
statementCacheSize :: IO Int
}
newtype StatementCacheKey = StatementCacheKey { StatementCacheKey -> Text
cacheKey :: Text }
mkCacheKeyFromQuery :: Text -> StatementCacheKey
mkCacheKeyFromQuery :: Text -> StatementCacheKey
mkCacheKeyFromQuery = Text -> StatementCacheKey
StatementCacheKey