libchamplain Reference Manual: ChamplainTileCache

## ChamplainTileCache ChamplainTileCache — A base class of tile caches |

## Functions

void | champlain_tile_cache_store_tile ()
void | champlain_tile_cache_refresh_tile_time ()
void | champlain_tile_cache_on_tile_filled ()

## Types and Values

struct | ChamplainTileCache

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── ChamplainMapSource
                ╰── ChamplainTileCache
                    ├── ChamplainFileCache
                    ╰── ChamplainMemoryCache

## Description

This class defines properties and methods commons to all caches (that is, map sources that permit storage and retrieval of tiles). Tiles are typically stored by ChamplainTileSource objects.

## Functions

### champlain_tile_cache_store_tile ()

    void
    champlain_tile_cache_store_tile (ChamplainTileCache *tile_cache,
                                     ChamplainTile *tile,
                                     const gchar *contents,
                                     gsize size);

Stores the tile including the metadata into the cache.

#### Parameters

tile_cache | a ChamplainTileCache |
tile | a ChamplainTile |
contents | the tile contents that should be stored |
size | size of the contents in bytes |

Since 0.6

### champlain_tile_cache_refresh_tile_time ()

    void
    champlain_tile_cache_refresh_tile_time
                                   (ChamplainTileCache *tile_cache,
                                    ChamplainTile *tile);

Refreshes the tile access time in the cache.

#### Parameters

tile_cache | a ChamplainTileCache |
tile | a ChamplainTile |

Since 0.6

### champlain_tile_cache_on_tile_filled ()

    void
    champlain_tile_cache_on_tile_filled (ChamplainTileCache *tile_cache,
                                         ChamplainTile *tile);

When a cache fills a tile and the next source in the chain is a tile cache, it should call this function on the next source. This way all the caches preceding a tile source in the chain get informed that the tile was used and can modify their metadata accordingly in the implementation of this function. In addition, the call of this function should be chained so within the implementation of this function it should be called on the next source in the chain when next source is a tile cache.

#### Parameters

tile_cache | a ChamplainTileCache |
tile | a ChamplainTile |

Since 0.6

## Types and Values

### struct ChamplainTileCache

    struct ChamplainTileCache;

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

Since 0.6