úÎZ     portable experimentalUwe Schmidt (uwe@fh-wedel.de)2withCache enables reading documents with caching. lWhen the cache is configured and enabled, every document read and parsed is serialized and stored in binary l form in the cache. When reading the same document again, it is just deserialized, no parsing is performed. UThe cache is configured by a path pointing to a directory for storing the documents, j by a maximal time span in second for valid documents. After that time span, the documents are read again  and the cache is updated. S The flag contols, whether documents returning 404 or other errors will be cached. V If set, the cache is even activated for 404 (not found) responses, default is false. \The serialized documents can be compressed, e.g. with bzip, to save disk space and IO time. & The compression can be configured by +Text.XML.HXT.Arrow.XmlState.withCompression  example:   import Text.XML.HXT.Core  import Text.XML.HXT.Cache 6 import Codec.Compression.BZip (compress, decompress)  ... 2 readDocument [ withCache "/tmp/cache" 3600 False 7 , withCompression (compress, decompress)  , .... * ] "http://www.haskell.org/"  OIn the example the document is read and stored in binary serialized form under /tmp/cache. 6 The cached document remains valid for the next hour. + It is compressed, before written to disk. Disable use of cache <Predicate arrow for checking if a document is in the cache. _ The arrow fails if document not there or is not longer valid, else the file name is returned.    OCompute the SHA1 hash is hexadecimal format for an arbitray serializable value !the internal table of file locks    portable experimentalUwe Schmidt (uwe@fh-wedel.de)     hxt-cache-9.0.1 Control.Concurrent.ResourceTableText.XML.HXT.Arrow.XmlCacheText.XML.HXT.Cache ResourceLock ResourceTablerequestResourcereleaseResourcenewResourceTable withCache withoutCache isInCache lookupCache readCache writeCache sha1HashValuesha1HashString readDocCache lookupCache' readCache'remFile cacheFilecacheHittry' writeIndextheLockedFileslockFile unlockFilewithLock