GitCache

Cache backed by a git repository. Git's packfiles provide an efficient way to store binary files with small differences, however adding and extracting items is a little slower.

Constructors

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

Members

Functions

add
void add(string key, string sourcePath)
Undocumented in source. Be warned that the author may not have intended to support it.
extract
void extract(string key, string targetPath, bool delegate(string) pathFilter)
Undocumented in source. Be warned that the author may not have intended to support it.
finalize
void finalize()
Undocumented in source. Be warned that the author may not have intended to support it.
getEntries
string[] getEntries()
Undocumented in source. Be warned that the author may not have intended to support it.
haveEntry
bool haveEntry(string key)
Undocumented in source. Be warned that the author may not have intended to support it.
listFiles
string[] listFiles(string key)
Undocumented in source. Be warned that the author may not have intended to support it.
optimize
void optimize()
Undocumented in source. Be warned that the author may not have intended to support it.
remove
void remove(string key)
Undocumented in source. Be warned that the author may not have intended to support it.
verify
void verify()
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

name
string name [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

refPrefix
auto refPrefix;

Builds are pinned by refs namespaced by this prefix.

Variables

git
Git git;
Undocumented in source.

Inherited Members

From DCache

cacheDir
string cacheDir;

Directory which will hold the cached builds.

host
ICacheHost host;

Callback interface.

name
string name [@property getter]

Get name of this cache engine.

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.

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.

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.

remove
void remove(string key)

Delete a cache entry.

finalize
void finalize()

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

optimize
void optimize()

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

verify
void verify()

Verify cache integrity.

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

Utility function (copy file or directory)

Meta