Opened 15 years ago

Last modified 15 years ago

#1332 new defect

Tile Cache should only be cleared if the saved Map Definition resource has changes in base layer settings

Reported by: jng Owned by:
Priority: high Milestone:
Component: Tile Service Version:
Severity: critical Keywords:
Cc: External ID:

Description (last modified by jng)

The Tile Cache invalidation logic should be more refined. Currently saving a Map Definition will invalidate the tile cache for that layer, even if there were no changes to the base layer settings.

The Tile Cache should only be invalidated when there are changes found in the base layer section of the Map Definition. For example, adding dynamic layers to a Map Definition with tiled layers and saving that resource should not clear the tile cache as the tiles are still valid.

Steps to reproduce:

  1. View any web layout containing a map definition w/ tiled layers
  2. A generated folder containing the tiles should be in the defined TileCache folder
  3. Perform any change to this map definition that does not affect the base layers (eg. Changing the description, adding an untiled layer, etc) and save it.
  4. That generated folder is now deleted. Nothing was changed in the base layer settings so this folder (and all generated tiles within) should have remained.

Change History (5)

comment:1 by jng, 15 years ago

Description: modified (diff)

comment:2 by jng, 15 years ago

Summary: Tile Cache should only be cleared if the saved Map Definition resource has changes in base layerTile Cache should only be cleared if the saved Map Definition resource has changes in base layer settings

comment:3 by zspitzer, 15 years ago

i think adding a dynamic layer to a non base map group can change the map bounds, which alas makes sense to clear the map

this is really horrible but hard to solve problem, best discussed on internals i reckon

comment:4 by tomfukushima, 15 years ago

Actually, it would be possible to check if the map bounds changed by looking at the contents of the Extents element. Same check needed for CoordinateSystem.

We also need to track when a feature source, drawing source, symbol library, symbol definition or layer definition is changed; we need to follow the dependency chain until we get to the map definition that uses the changed resource. Then we need to check to see if that change affects the base layer or not. I believe that the "follow the dependency chain" code is already there so this is probably not as bad as it sounds.

BTW, is this a workaround that can be used until this gets addressed: before changing anything that affects the non-tiled parts of the map definition, rename the directory that the tiles are in. Then make the resource change, then rename the directory back.

Note: See TracTickets for help on using tickets.