Cache

#SoupCache implements a file-based cache for HTTP resources.

Constructors

this
this(SoupCache* soupCache, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this(string cacheDir, SoupCacheType cacheType)

Creates a new #SoupCache.

Members

Functions

clear
void clear()

Will remove all entries in the @cache plus all the cache files.

dump
void dump()

Synchronously writes the cache index out to disk. Contrast with soup_cache_flush(), which writes pending cache <emphasis>entries</emphasis> to disk.

flush
void flush()

This function will force all pending writes in the @cache to be committed to disk. For doing so it will iterate the #GMainContext associated with @cache's session as long as needed.

getCacheStruct
SoupCache* getCacheStruct(bool transferOwnership)

Get the main Gtk struct

getMaxSize
uint getMaxSize()

Gets the maximum size of the cache.

getStruct
void* getStruct()

the main Gtk struct as a void*

load
void load()

Loads the contents of @cache's index into memory.

setMaxSize
void setMaxSize(uint maxSize)

Sets the maximum size of the cache.

Mixins

__anonymous
mixin SessionFeatureT!(SoupCache)
Undocumented in source.

Static functions

getType
GType getType()

Variables

soupCache
SoupCache* soupCache;

the main Gtk struct

Inherited Members

From SessionFeatureIF

getSessionFeatureStruct
SoupSessionFeature* getSessionFeatureStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getType
GType getType()
addFeature
bool addFeature(GType type)

Adds a "sub-feature" of type @type to the base feature @feature. This is used for features that can be extended with multiple different types. Eg, the authentication manager can be extended with subtypes of #SoupAuth.

attach
void attach(Session session)
detach
void detach(Session session)
hasFeature
bool hasFeature(GType type)

Tests if @feature has a "sub-feature" of type @type. See soup_session_feature_add_feature().

removeFeature
bool removeFeature(GType type)

Removes the "sub-feature" of type @type from the base feature @feature. See soup_session_feature_add_feature().

Meta