Cache.insert

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 key_equal_func function passed to glib.cache.Cache.new_. If it does already exist it is returned, and its reference count is increased by one. If the value does not currently exist, if is created by calling the value_new_func. The key is duplicated by calling key_dup_func and the duplicated key and value are inserted into the #GCache.

More...
class Cache
void*
insert
(
void* key = null
)

Parameters

key void*

a key describing a #GCache object

Return Value

Type: void*

a pointer to a #GCache value

Detailed Description

Deprecated: Use a #GHashTable instead