|  |  |  | libchamplain Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Properties | ||||
struct ChamplainFileCache; ChamplainFileCache * champlain_file_cache_new_full (guint size_limit,const gchar *cache_dir,ChamplainRenderer *renderer); void champlain_file_cache_set_size_limit (ChamplainFileCache *file_cache,guint size_limit); guint champlain_file_cache_get_size_limit (ChamplainFileCache *file_cache); const gchar * champlain_file_cache_get_cache_dir (ChamplainFileCache *file_cache); void champlain_file_cache_purge (ChamplainFileCache *file_cache); void champlain_file_cache_purge_on_idle (ChamplainFileCache *file_cache);
  GObject
   +----GInitiallyUnowned
         +----ChamplainMapSource
               +----ChamplainTileCache
                     +----ChamplainFileCache
"cache-dir" gchar* : Read / Write / Construct Only "size-limit" guint : Read / Write / Construct
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.
struct ChamplainFileCache;
The ChamplainFileCache structure contains only private data and should be accessed using the provided API
Since 0.6
ChamplainFileCache * champlain_file_cache_new_full (guint size_limit,const gchar *cache_dir,ChamplainRenderer *renderer);
Constructor of ChamplainFileCache.
| 
 | maximum size of the cache in bytes | 
| 
 | the directory where the cache is created. When cache_dir == NULL, a cache in ~/.cache/champlain is used. [allow-none] | 
| 
 | the ChamplainRenderer used for tiles rendering | 
| Returns : | a constructed ChamplainFileCache | 
Since 0.8
void champlain_file_cache_set_size_limit (ChamplainFileCache *file_cache,guint size_limit);
Sets the cache size limit in bytes.
| 
 | a ChamplainFileCache | 
| 
 | the cache limit in bytes | 
Since 0.4
guint               champlain_file_cache_get_size_limit (ChamplainFileCache *file_cache);
Gets the cache size limit in bytes.
| 
 | a ChamplainFileCache | 
| Returns : | size limit | 
Since 0.4
const gchar *       champlain_file_cache_get_cache_dir  (ChamplainFileCache *file_cache);
Gets the directory where the cache database is stored.
| 
 | a ChamplainFileCache | 
| Returns : | the directory | 
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.
| 
 | a ChamplainFileCache | 
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
| 
 | a ChamplainFileCache | 
Since 0.4
"cache-dir" property  "cache-dir"                gchar*                : Read / Write / Construct Only
The directory where the tile database is stored.
Default value: NULL
Since 0.6
"size-limit" property  "size-limit"               guint                 : Read / Write / Construct
The cache size limit in bytes.
Note: this new value will not be applied until you call champlain_file_cache_purge()
Allowed values: [1,G_MAXINT]
Default value: 100000000
Since 0.4