Champlain.FileCache¶
- Subclasses:
None
Methods¶
- Inherited:
Champlain.TileCache (3), Champlain.MapSource (20), GObject.Object (37)
- Structs:
class |
|
|
|
|
Virtual Methods¶
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
The directory of the cache |
||
r/w/c |
The cache’s size limit (Mb) |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Champlain.FileCache(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
The
Champlain.FileCache
structure contains only private data and should be accessed using the provided APINew in version 0.6.
- classmethod new_full(size_limit, cache_dir, renderer)¶
- Parameters:
size_limit (
int
) – maximum size of the cache in bytescache_dir (
str
orNone
) – the directory where the cache is created. When cache_dir ==None
, a cache in ~/.cache/champlain is used.renderer (
Champlain.Renderer
) – theChamplain.Renderer
used for tiles rendering
- Returns:
a constructed
Champlain.FileCache
- Return type:
Constructor of
Champlain.FileCache
.New in version 0.8.
- get_cache_dir()¶
- Returns:
the directory
- Return type:
Gets the directory where the cache database is stored.
New in version 0.6.
- get_size_limit()¶
- Returns:
size limit
- Return type:
Gets the cache size limit in bytes.
New in version 0.4.
- purge()¶
Purge the cache from the less popular tiles until cache’s size limit is reached.
New in version 0.4.
- purge_on_idle()¶
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
New in version 0.4.
Property Details¶
- Champlain.FileCache.props.cache_dir¶
- Name:
cache-dir
- Type:
- Default Value:
- Flags:
The directory where the tile database is stored.
New in version 0.6.