Soup.Cache.new
Description: Reference for Soup.Cache.new

### Constructor

# Soup Cachenew

#### Declaration [src]

    SoupCache*
    soup_cache_new (
      const char* cache_dir,
      SoupCacheType cache_type
    )

#### Description [src]

Creates a new `SoupCache`.

#### Parameters

`cache_dir` | `const char*`
| The directory to store the cached data, or `NULL` to use the default one. Note that since the cache isn’t safe to access for multiple processes at once, and the default directory isn’t namespaced by process, clients are strongly discouraged from passing `NULL`.
| The argument can be `NULL`.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`cache_type` | `SoupCacheType`
| The `SoupCacheType` of the cache.

#### Return value

Returns: | `SoupCache`
| A new `SoupCache`.
| The caller of the function takes ownership of the data, and is responsible for freeing it.