gws.gis.cache.seed

Cache seeding.

Source code: gws.gis.cache.seed

Module Contents

gws.gis.cache.seed.DEFAULT_BLOCK_SIZE = 8
gws.gis.cache.seed.PROGRESS_INTERVAL = 5
gws.gis.cache.seed.seed(root: gws.Root, opts: gws.gis.cache.core.SeedOptions) → gws.gis.cache.core.SeedResult

Fill the selected caches with missing tiles.

Tiles are requested from the grabbers in blocks by opts.concurrency worker threads, round-robin over the caches, until all blocks are done, the time limit is reached or the run is interrupted. Only one seeding run can be active on the server; if another one is running, nothing is done and the status is locked.

Parameters:
  • root – Configuration root.

  • opts – Seeding options. Missing values default to 600 seconds and one thread.

Returns:

The seeding result with per-level statistics.