Clears the specified extent of the background cache.
Public Function ClearBackgroundCache( _
ByVal name As String _
- The name of the specified composition.
- The x coordinate of the first extent to clear.
- The y coordinate of the first extent to clear.
- The x coordinate of the second extent to clear.
- The y coordinate of the second extent to clear.
- The coordinate reference system used.
When ClearBackgroundCache is called, it is possible that 10s or 100s of thousands of tiles become obsolete.
It is assumed that deleting a very large number of files will take a very long time, during which all RenderTile requests would have to wait.
Furthermore, it is anticipated that the majority of subsequent RenderTile requests will need to create new tiles in the cache so a relatively large number of files will need to be created in the future. .22.214.171.124.126.96.36.199.3
Therefore in order to speed up ClearBackgroundCache requests and also RenderTile requests that follow a call to ClearBackgroundCache, the following method is employed:
1) ClearBackgroundCache removes all affected tiles from the (internal) tile lookup map, and remembers them in a (internal) "deleted tile list". It does nothing else. In particular, it does not touch the file system.
2) Each call to RenderTile will inspect the "deleted tile list". If that list is not empty, then a single tile will be deleted from disk. Additionally, if RenderTile finds that it needs to create a new tile in order to serve the request, then it will reuse an existing tile from the "deleted tile list", if possible.
3) When GeognoSIS is shut down, then the tile cache will delete from disk all remaining tiles of the "deleted tile list".
sis.ClearBackgroundCache (100,100,200,200, "*APrjNatGrid")