gws.gis.cache.core

Cache management.

Source code: gws.gis.cache.core

Module Contents

gws.gis.cache.core.cleanup(root: gws.Root)
class gws.gis.cache.core.Config(*args, **kwargs)

Bases: gws.Config

Global cache options

seedingConcurrency: int = 1

number of concurrent seeding jobs

seedingMaxTime: gws.Duration = '600'

max. time for a seeding job

gws.gis.cache.core.drop(root: gws.Root, layer_uids=None)
class gws.gis.cache.core.Entry(*args, **kwargs)

Bases: gws.Data

Basic data object.

This object can be instantiated by passing one or or dict arguments and/or keyword args. All dicts keys and keywords become attributes of the object.

Accessing an undefined attribute returns None and no error is raised, unless the attribute name starts with an underscore.

config: dict
counts: dict
dirname: str
grids: dict[int, Grid]
layers: list[gws.Node]
mpxCache: dict
uid: str
class gws.gis.cache.core.Grid(*args, **kwargs)

Bases: gws.Data

Basic data object.

This object can be instantiated by passing one or or dict arguments and/or keyword args. All dicts keys and keywords become attributes of the object.

Accessing an undefined attribute returns None and no error is raised, unless the attribute name starts with an underscore.

cachedTiles: int
maxX: int
maxY: int
res: float
totalTiles: int
uid: str
z: int
gws.gis.cache.core.seed(root: gws.Root, layer_uids=None, max_time=None, concurrency=1, levels=None)
class gws.gis.cache.core.Status(*args, **kwargs)

Bases: gws.Data

Basic data object.

This object can be instantiated by passing one or or dict arguments and/or keyword args. All dicts keys and keywords become attributes of the object.

Accessing an undefined attribute returns None and no error is raised, unless the attribute name starts with an underscore.

entries: list[Entry]
staleDirs: list[str]
gws.gis.cache.core.status(root: gws.Root, layer_uids=None, with_counts=True) Status
gws.gis.cache.core.store_in_web_cache(url: str, img: bytes)