hackage-security-0.1.0.0: Hackage security library

Safe HaskellNone
LanguageHaskell2010

Hackage.Security.Client.Repository.Cache

Description

The files we cache from the repository

Both the Local and the Remote repositories make use of this module.

Synopsis

Documentation

data Cache Source

Location and layout of the local cache

Constructors

Cache 

getCached :: Cache -> CachedFile -> IO (Maybe AbsolutePath) Source

Get a cached file (if available)

getCachedRoot :: Cache -> IO AbsolutePath 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 -> IO (Maybe AbsolutePath) Source

Get the cached index (if available)

clearCache :: Cache -> IO () Source

Delete a previously downloaded remote file

getFromIndex :: Cache -> IndexLayout -> IndexFile -> IO (Maybe ByteString) Source

Get a file from the index

cacheRemoteFile :: Cache -> TempPath -> Format f -> IsCached -> IO () Source

Cache a previously downloaded remote file