GLib.CacheNewFunc
Description: Reference for GLib.CacheNewFunc

### Function

# GLibCacheNewFunc

deprecated: 2.32 since: 2.0

#### Declaration

    gpointer
    (* GCacheNewFunc) (
      gpointer key
    )

#### Description

Specifies the type of the `value_new_func` function passed to g_cache_new(). It is passed a `GCache` key and should create the value corresponding to the key.

Available since: 2.0

Deprecated since: 2.32

Use a `GHashTable` instead.

#### Parameters

`key`

  Type: `gpointer`

  A `GCache` key.

  The argument can be `NULL`.
  The data is owned by the caller of the function.

#### Return value

Type: `gpointer`

A new `GCache` value corresponding to the key.

The data is owned by the called function.
The return value can be `NULL`.