ChamplainMemoryCache

ChamplainMemoryCache — Stores and loads cached tiles from the memory

Functions

Properties

guint size-limit Read / Write / Construct

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── ChamplainMapSource
            ╰── ChamplainTileCache
                ╰── ChamplainMemoryCache

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.

Functions

champlain_memory_cache_new_full ()

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

Constructor of ChamplainMemoryCache.

Parameters

size_limit

maximum 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 maximum number of tiles stored in the cache.

Parameters

memory_cache

a ChamplainMemoryCache

 

Returns

maximum 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 maximum number of tiles stored in the cache.

Parameters

memory_cache

a ChamplainMemoryCache

 

size_limit

maximum 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.

Parameters

memory_cache

a ChamplainMemoryCache

 

Since: 0.8

Types and Values

struct ChamplainMemoryCache

struct ChamplainMemoryCache;

The ChamplainMemoryCache structure contains only private data and should be accessed using the provided API

Since: 0.8

Property Details

The “size-limit” property

  “size-limit”               guint

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

Owner: ChamplainMemoryCache

Flags: Read / Write / Construct

Allowed values: [1,G_MAXINT]

Default value: 100

Since: 0.8