soup.cache

Module for [Cache] class

Types 3

File-based cache for HTTP resources.

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
Cache self() nothrowReturns `this`, for use in `with` statements.
CacheGidBuilder builder() static nothrowGet builder for [soup.cache.Cache] Returns: New builder object
string cacheDir() @property nothrowGet `cacheDir` property. Returns: The directory to store the cache files.
soup.types.CacheType cacheType() @property nothrowGet `cacheType` property. Returns: Whether the cache is private or shared.
void clear() nothrowWill remove all entries in the cache plus all the cache files.
void dump() nothrowSynchronously writes the cache index out to disk.
void flush() nothrowForces all pending writes in the cache to be committed to disk.
uint getMaxSize() nothrowGets the maximum size of the cache. Returns: the maximum size of the cache, in bytes.
void load() nothrowLoads the contents of cache's index into memory.
void setMaxSize(uint maxSize) nothrowSets the maximum size of the cache.
Constructors
this(void * ptr, Flag!"Take" take)
this(string cacheDir, soup.types.CacheType cacheType)Creates a new #SoupCache.

Fluent builder implementation template for soup.cache.Cache

Methods
T cacheDir(string propval) nothrowSet `cacheDir` property. Params: propval = The directory to store the cache files. Returns: Builder instance for fluent chaining
T cacheType(soup.types.CacheType propval) nothrowSet `cacheType` property. Params: propval = Whether the cache is private or shared. Returns: Builder instance for fluent chaining

Fluent builder for soup.cache.Cache

Methods
Cache build() nothrowCreate object from builder. Returns: New object