packages feed

TCache 0.5.1 → 0.5.2

raw patch · 2 files changed

+23/−23 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Data/TCache.hs view
@@ -120,7 +120,7 @@ 	-- (NOTE: reads and writes can't collide, so they-- Not really needed since no write is done while read 	-- must be strict, not lazy ) 	readResource :: a->IO (Maybe a)
-        readResource x=handleJust ioErrors (handle x) $ do 
+        readResource x=handleJust Exception.ioErrors (handle x) $ do 
              s::String <- readFileStrict  filename  --`debug` ("read "++filename)
              return $ Just $ deserialize s              where@@ -134,7 +134,7 @@               | otherwise= error $ "unspecified error: " ++ show e
 
 	writeResource:: a->IO()
-        writeResource x= handleJust ioErrors (handle x) $ writeFile filename (serialize x) --`debug` ("write "++filename)
+        writeResource x= handleJust Exception.ioErrors (handle x) $ writeFile filename (serialize x) --`debug` ("write "++filename)
              where              filename= (defPath x ++ keyResource x)              handle :: a -> IOError -> IO ()@@ -147,7 +147,7 @@                | isPermissionError e = error $ "no permissions for writing file: "++ filename
  	delResource:: a->IO()
-	delResource x= handleJust ioErrors (handle x) $ removeFile $ defPath x ++ keyResource x+	delResource x= handleJust Exception.ioErrors (handle x) $ removeFile $ defPath x ++ keyResource x              where              handle :: a -> IOError -> IO ()              handle x e
TCache.cabal view
@@ -1,26 +1,26 @@ name:                TCache-version:             0.5.1+version:             0.5.2 synopsis:            A Transactional data cache with configurable persitence -description:         -------------------------------------------------
--- A Transactional data cache with configurable persitence--- The exported methods are documented in the TCache.hs header--- See also  http://haskell-web.blogspot.com
--- (Something like a little Java Hybernate or Rails for Rubi)
--- Author: Alberto Gómez Corona Nov 2006-2008   agocorona at gmail.com
--- Language: Haskell
--- Version: 0.5.1
--- Terms of use: you can do whatever you want
--- with this code as long as you keep this notice
-
--- 10/15/2007 : changes
--- Default writeResource and delResource for persistence in files
---     (only keyResource must be defined by the user if use defaults)
--- Coherent Inserts and deletes
--- Reduced the number of accesses to the hashtable
--- hashtable access put outside of the transaction block (takeBlocks) 
--- faster re-executions in case of rollback+description:         +        Data.Tcache is a transactional cache with configurable persistence. It tries to simulate Hibernate +        for Java or Rails for Ruby. The main difference is that transactions are done in memory trough STM. +        There are transactional cache implementations for some J2EE servers like JBOSS. -
+        TCache uses STM . It can  atomically apply a function to a list of cached objects. The resulting +        objects go back to the cache (withResources). It also can retrieve these objects (getResources).  +        Persistence can be syncronous (syncCache)  or asyncronous, wtih configurable time between cache +        writes and configurable cache clearance strategy. the size of the cache can be configured too . +        All of this can be done trough clearSyncCacheProc. Even the TVar variables can be accessed +        directly (getTVar) to acceess all the semantic of atomic blocks while maintaining the persistence of the +        TVar updates.++        Persistence can be defined for each object.: Each object must have a defined key, a default filename+        path (if applicable). Persistence is pre-defined in files, but the readResource writeResource and +        delResource methods can be redefined to persist in databases or whatever.++        There is a Sample.hs that explain the main features.++  category:            Middleware license:             BSD3