The cache module¶
Cache logic.
- class ImageCache[source]¶
Bases:
objectCache generated images.
Store and retrieve them under a key (see render.Renderer.key()).
- maxsize = 209715200¶
- currentsize = 0¶
- tileset(key)[source]¶
Return a dictionary with tile-entry pairs for the key.
If no single tile is available, an empty dict is returned.
- prepare(tiles)[source]¶
Make room before rendering new tiles.
This ensures there is space for the new tiles by adjusting the cache size and/or purging older images as needed.