DCache

Abstract base class.

Constructors

this
this(string cacheDir, ICacheHost cacheHost)
Undocumented in source.

Members

Functions

add
void add(string key, string sourcePath)

Add files from a directory. This operation is destructive: the cache implementation is allowed to modify the source directory.

cp
void cp(string src, string dst, bool silent)

Utility function (copy file or directory)

extract
void extract(string key, string targetPath, bool delegate(string) pathFilter)

Extract a cache entry to a target directory, with a filter for root files/directories.

finalize
void finalize()

Close the cache. Called after all operations are completed and the cache is no longer immediately needed.

getEntries
string[] getEntries()

Get a list of keys for all cached entries.

haveEntry
bool haveEntry(string key)

Check if an entry with the given key exists.

listFiles
string[] listFiles(string key)

Get the full file listing for the given cache entry. Forward slashes only.

optimize
void optimize()

Optimize the cache (minimize disk space). This operation can be very slow (and should display progress).

remove
void remove(string key)

Delete a cache entry.

verify
void verify()

Verify cache integrity.

Properties

name
string name [@property getter]

Get name of this cache engine.

Variables

cacheDir
string cacheDir;

Directory which will hold the cached builds.

host
ICacheHost host;

Callback interface.

Meta