### Class

# Shumate FileCache

since: 1.0

#### Description [src]

    final class Shumate.FileCache : GObject.Object
    {
      /* No available fields */
    }

A cache that stores and retrieves tiles from the file system. It is mainly used by `ShumateTileDownloader`, but can also be used by custom data sources.

The cache will be filled up to a certain size limit. When this limit is reached, the cache can be purged, and the tiles that are accessed least are deleted.

## ETags

The cache can optionally store an ETag string with each tile. This is useful to avoid redownloading old tiles that haven’t changed (for example, using the HTTP If-None-Match header).

Available since: 1.0

#### Ancestors

- GObject

#### Constructors

###### shumate_file_cache_new_full

Constructor of `ShumateFileCache`.

since: 1.0

#### Instance methods

###### shumate_file_cache_get_cache_dir

Gets the directory where the cache database is stored.

since: 1.0

###### shumate_file_cache_get_cache_key

Gets the key used to store and retrieve tiles from the cache. Different keys can be used to store multiple tilesets in the same cache directory.

since: 1.0

###### shumate_file_cache_get_size_limit

Gets the cache size limit in bytes.

since: 1.0

###### shumate_file_cache_get_tile_async

Gets tile data from the cache, if it is available.

since: 1.0

###### shumate_file_cache_get_tile_finish

Gets the tile data from a completed `shumate_file_cache_get_tile_async()` operation.

since: 1.0

###### shumate_file_cache_mark_up_to_date

Marks a tile in the cache as being up to date, without changing its data.

since: 1.0

###### shumate_file_cache_purge_cache_async

Removes less used tiles from the cache, if necessary, until it fits in the size limit.

since: 1.0

###### shumate_file_cache_purge_cache_finish

Gets the result of an async operation started using shumate_file_cache_purge_cache_async().

since: 1.0

###### shumate_file_cache_set_size_limit

Sets the cache size limit in bytes.

since: 1.0

###### shumate_file_cache_store_tile_async

Stores a tile in the cache.

since: 1.0

###### shumate_file_cache_store_tile_finish

Gets the success value of a completed `shumate_file_cache_store_tile_async()` operation.

since: 1.0

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### Shumate.FileCache:cache-dir

The directory where the tile database is stored.

since: 1.0

###### Shumate.FileCache:cache-key

The key used to store and retrieve tiles from the cache. Different keys can be used to store multiple tilesets in the same cache directory.

since: 1.0

###### Shumate.FileCache:size-limit

The cache size limit in bytes.

since: 1.0

#### Signals

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

unstable since: 2.0

#### Class structure

    struct ShumateFileCacheClass {
      GObjectClass parent_class;

    }

No description available.

###### Class members

`parent_class: GObjectClass`
  No description available.