Top |
gchar * | cache-dir | Read / Write / Construct Only |
guint | size-limit | Read / Write / Construct |
GObject ╰── GInitiallyUnowned ╰── ChamplainMapSource ╰── ChamplainTileCache ╰── ChamplainFileCache
ChamplainFileCache is a cache that stores and retrieves tiles from the file system. Tiles most frequently loaded gain in "popularity". This popularity is taken into account when purging the cache.
ChamplainFileCache * champlain_file_cache_new_full (guint size_limit
,const gchar *cache_dir
,ChamplainRenderer *renderer
);
Constructor of ChamplainFileCache.
size_limit |
maximum size of the cache in bytes |
|
cache_dir |
the directory where the cache is created. When cache_dir == NULL, a cache in ~/.cache/champlain is used. |
[allow-none] |
renderer |
the ChamplainRenderer used for tiles rendering |
Since: 0.8
guint
champlain_file_cache_get_size_limit (ChamplainFileCache *file_cache
);
Gets the cache size limit in bytes.
Since: 0.4
void champlain_file_cache_set_size_limit (ChamplainFileCache *file_cache
,guint size_limit
);
Sets the cache size limit in bytes.
Since: 0.4
const gchar *
champlain_file_cache_get_cache_dir (ChamplainFileCache *file_cache
);
Gets the directory where the cache database is stored.
Since: 0.6
void
champlain_file_cache_purge (ChamplainFileCache *file_cache
);
Purge the cache from the less popular tiles until cache's size limit is reached.
Since: 0.4
void
champlain_file_cache_purge_on_idle (ChamplainFileCache *file_cache
);
Purge the cache from the less popular tiles until cache's size limit is reached. This is a non blocking call as the purge will happen when the application is idle
Since: 0.4
struct ChamplainFileCache;
The ChamplainFileCache structure contains only private data and should be accessed using the provided API
Since: 0.6
“cache-dir”
property“cache-dir” gchar *
The directory where the tile database is stored.
Owner: ChamplainFileCache
Flags: Read / Write / Construct Only
Default value: NULL
Since: 0.6
“size-limit”
property“size-limit” guint
The cache size limit in bytes.
Note: this new value will not be applied until you call champlain_file_cache_purge()
Owner: ChamplainFileCache
Flags: Read / Write / Construct
Allowed values: [1,G_MAXINT]
Default value: 100000000
Since: 0.4