Safe Haskell | None |
---|---|
Language | Haskell2010 |
The files we cache from the repository
Both the Local and the Remote repositories make use of this module.
- data Cache = Cache {}
- getCached :: Cache -> CachedFile -> IO (Maybe (Path Absolute))
- getCachedRoot :: Cache -> IO (Path Absolute)
- getCachedIndex :: Cache -> Format f -> IO (Maybe (Path Absolute))
- clearCache :: Cache -> IO ()
- withIndex :: Cache -> (Handle -> IO a) -> IO a
- getIndexIdx :: Cache -> IO TarIndex
- cacheRemoteFile :: forall down typ f. DownloadedFile down => Cache -> down typ -> Format f -> IsCached typ -> IO ()
- lockCache :: Cache -> IO () -> IO ()
Documentation
Location and layout of the local cache
getCached :: Cache -> CachedFile -> IO (Maybe (Path Absolute)) Source #
Get a cached file (if available)
getCachedRoot :: Cache -> IO (Path Absolute) Source #
Get the cached root
Calling getCachedRoot
without root info available is a programmer error
and will result in an unchecked exception. See requiresBootstrap
.
getCachedIndex :: Cache -> Format f -> IO (Maybe (Path Absolute)) Source #
Get the cached index (if available)
clearCache :: Cache -> IO () Source #
Delete a previously downloaded remote file
cacheRemoteFile :: forall down typ f. DownloadedFile down => Cache -> down typ -> Format f -> IsCached typ -> IO () Source #
Cache a previously downloaded remote file