packages feed

hxt-cache 9.0.0 → 9.0.1

raw patch · 3 files changed

+10/−3 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

examples/mini/Cache.hs view
@@ -6,6 +6,8 @@ import Text.XML.HXT.Cache import Codec.Compression.BZip (compress, decompress) +import System+ main = runX ( readDocument [ withParseHTML yes                            , withWarnings no                            , withRemoveWS yes@@ -13,10 +15,13 @@                                                                         -- documents remain valid 10 seconds (for testing)                                                                         -- no 404 documents are cached                            , withCompression (compress, decompress)     -- the cached files will be BZip compressed+                           , withStrictDeserialize yes                  -- cache file will be read and closed immediatly                            , withTrace 2                            , withCurl []                                -- curl is taken for HTTP access                            ] "http://www.fh-wedel.de/"               >>>+--              perform (arrIO0 $ system "/usr/bin/lsof")+--              >>>               processChildren (hasName "html" /> hasName "body" //> isText)               >>>               writeDocument [] ""
hxt-cache.cabal view
@@ -1,5 +1,5 @@ Name:           hxt-cache-Version:        9.0.0+Version:        9.0.1 Synopsis:       Cache for HXT XML Documents and other binary data Description:    Extension for caching XML documents and other binary data in cache directory                 of the local filesystem.@@ -25,7 +25,9 @@   Control.Concurrent.ResourceTable   hs-source-dirs: src+  ghc-options: -Wall+ ghc-prof-options: -auto-all -caf-all   build-depends: base       >= 4   && < 5,                 bytestring >= 0.9 && < 1,
src/Text/XML/HXT/Arrow/XmlCache.hs view
@@ -59,7 +59,7 @@ -- When the cache is configured and enabled, every document read and parsed is serialized and stored in binary -- form in the cache. When reading the same document again, it is just deserialized, no parsing is performed. ----- The cache is configured by a path pointing to a directory for storing the docuemnts,+-- The cache is configured by a path pointing to a directory for storing the documents, -- by a maximal time span in second for valid documents. After that time span, the documents are read again -- and the cache is updated. -- The flag contols, whether documents returning 404 or other errors will be cached.@@ -234,7 +234,7 @@     readC cdir          = readCache' $ uncurry (</>) $ cacheFile cdir f  readCache'              :: (NFData c, Binary c) => String -> IOStateArrow s b c-readCache' cf           = withLock cf $ readBinaryValue cf+readCache' cf           = rnfA $ withLock cf $ readBinaryValue cf  writeCache              :: (Binary b) => String -> IOStateArrow s b () writeCache f            = writeC $< getSysVar theCacheDir