Cache Reader¶
The entry point to a cache: TCacheReader.Create opens one, and its Indices are the
TCacheIndex records everything else is read through.
The global CacheReader is what the rest of this library reads from, so assign to it rather
than keeping your own.
CacheReader.Load¶
procedure TCacheReader.Load();
Reads the cache’s data file and its master index off disk, then opens one TCacheIndex per index file listed in the master index.
Path must already be set. Call this again to pick up a cache that has changed on disk.
CacheReader.Create¶
function TCacheReader.Create(path: String): TCacheReader; static;
function TCacheReader.Create(): TCacheReader; static; overload;
Opens the cache that a client keeps under path, which is the directory holding jagexcache
rather than the cache directory itself.
The overload without arguments uses the RuneLite cache in the current user’s home directory.
Opening the cache reads every index’s reference table, so afterwards you know which archives exist and what is in them, but no archive’s contents have been decompressed yet - that is what TCacheIndex.Cache is for.
Example:
CacheReader := TCacheReader.Create();
CacheReader.Indices[ECacheIndex.CONFIGS].Cache();