glib.cache

Module for [Cache] class

class Cache

Types 1

classCache

A [glib.cache.Cache] allows sharing of complex data structures, in order to save system resources.

[glib.cache.Cache] uses keys and values. A [glib.cache.Cache] key describes the properties of a particular resource. A [glib.cache.Cache] value is the actual resource.

[glib.cache.Cache] has been marked as deprecated, since this API is rarely used and not very actively maintained.

Deprecated

Use a #GHashTable instead
Fields
GCache * _cInstancePtr
bool owned
Methods
void * _cPtr()
void destroy()Frees the memory allocated for the #GCache.
void * insert(void * key = null)Gets the value corresponding to the given key, creating it if necessary. It first checks if the value already exists in the #GCache, by using the keyequalfunc function passed to [glib.cache.Cache.n...
void keyForeach(glib.types.HFunc func)Calls the given function for each of the keys in the #GCache.
void remove(const(void) * value = null)Decreases the reference count of the given value. If it drops to 0 then the value and its corresponding key are destroyed, using the valuedestroyfunc and keydestroyfunc passed to [glib.cache.Cache....
void valueForeach(glib.types.HFunc func)Calls the given function for each of the values in the #GCache.
Constructors
this(void * ptr, Flag!"Take" take)