ChamplainMemoryCache

## ChamplainMemoryCache ChamplainMemoryCache — Stores and loads cached tiles from the memory |

## Synopsis

                        ChamplainMemoryCache;
    ChamplainMemoryCache * champlain_memory_cache_new_full  (guint size_limit,
                                                             ChamplainRenderer *renderer);
    guint               champlain_memory_cache_get_size_limit
                                                            (ChamplainMemoryCache *memory_cache);
    void                champlain_memory_cache_set_size_limit
                                                            (ChamplainMemoryCache *memory_cache,
                                                             guint size_limit);
    void                champlain_memory_cache_clean        (ChamplainMemoryCache *memory_cache);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----ChamplainMapSource
                   +----ChamplainTileCache
                         +----ChamplainMemoryCache

## Properties

      "size-limit"               guint                 : Read / Write / Construct

## Description

ChamplainMemoryCache is a cache that stores and retrieves tiles from the memory. The cache contents is not preserved between application restarts so this cache serves mostly as a quick access temporary cache to the most recently used tiles.

## Details

### ChamplainMemoryCache

    typedef struct _ChamplainMemoryCache ChamplainMemoryCache;

### champlain_memory_cache_new_full ()

    ChamplainMemoryCache * champlain_memory_cache_new_full  (guint size_limit,
                                                             ChamplainRenderer *renderer);

Constructor of ChamplainMemoryCache.

`size_limit` : | maximal number of tiles stored in the cache
`renderer` : | the ChamplainRenderer used for tiles rendering
Returns : | a constructed ChamplainMemoryCache

Since 0.8

### champlain_memory_cache_get_size_limit ()

    guint               champlain_memory_cache_get_size_limit
                                                            (ChamplainMemoryCache *memory_cache);

Gets the maximal number of tiles stored in the cache.

`memory_cache` : | a ChamplainMemoryCache
Returns : | maximal number of stored tiles

Since 0.8

### champlain_memory_cache_set_size_limit ()

    void                champlain_memory_cache_set_size_limit
                                                            (ChamplainMemoryCache *memory_cache,
                                                             guint size_limit);

Sets the maximal number of tiles stored in the cache.

`memory_cache` : | a ChamplainMemoryCache
`size_limit` : | maximal number of tiles stored in the cache

Since 0.8

### champlain_memory_cache_clean ()

    void                champlain_memory_cache_clean        (ChamplainMemoryCache *memory_cache);

Cleans the contents of the cache.

`memory_cache` : | a ChamplainMemoryCache

Since 0.8

## Property Details

### The `"size-limit"` property

      "size-limit"               guint                 : Read / Write / Construct

The maximal number of tiles that are stored in the cache.

Allowed values: [1,G_MAXINT]

Default value: 100

Since 0.8