gws.gis.cache.core

Cache management.

Source code: gws.gis.cache.core

Module Contents

class gws.gis.cache.core.Config(*args, **kwargs)

Bases: gws.Config

Global cache options

seedingMaxTime: gws.Duration = '600'

max. time for a seeding job

seedingConcurrency: int = 1

number of concurrent seeding jobs

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.

uid: str
z: int
res: float
maxX: int
maxY: int
totalTiles: int
cachedTiles: int
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.

uid: str
layers: list[gws.Node]
mpxCache: dict
grids: dict[int, Grid]
config: dict
counts: dict
dirname: str
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.cleanup(root: gws.Root)
gws.gis.cache.core.drop(root: gws.Root, layer_uids=None)
gws.gis.cache.core.seed(root: gws.Root, layer_uids=None, max_time=None, concurrency=1, levels=None)
gws.gis.cache.core.store_in_web_cache(url: str, img: bytes)