-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A Linux-only cache system associating values to files. The values are discarded when the files are modified. -- -- A Linux-only cache system associating values to files. The values are -- discarded when the files are modified. @package filecache @version 0.2.0 module Data.FileCache type FileCache = FileCacheR String data FileCacheR r a -- | Generates a new file cache. The opaque type is for use with other -- functions. newFileCache :: Error r => IO (FileCacheR r a) -- | Destroys the thread running the FileCache. Pretty dangerous stuff. killFileCache :: FileCacheR r a -> IO () -- | Manually invalidates an entry. invalidate :: Error r => FilePath -> FileCacheR r a -> IO () -- | Queries the cache, populating it if necessary. query :: Error r => FileCacheR r a -> FilePath -> IO (Either r a) -> IO (Either r a) -- | Gets a copy of the cache. getCache :: Error r => FileCacheR r a -> IO (HashMap FilePath (Either r a, WatchDescriptor)) -- | Just like query, but with the standard Either type. lazyQuery :: Error r => FileCacheR r a -> FilePath -> IO (Either r a) -> IO (Either r a)