ClearBackgroundCache
Clears the specified extent of the background cache.
Visual Basic |
---|
Public Function ClearBackgroundCache( _
ByVal name As String _ ByVal x1 As Double, _
ByVal y1 As Double, _
ByVal x2 As Double, _
ByVal y2 As Double _
ByVal prj As String, _
) As Integer
|
- name
- The name of the specified composition.
- x1
- The x coordinate of the first extent to clear.
- y1
- The y coordinate of the first extent to clear.
- x2
- The x coordinate of the second extent to clear.
- y2
- The y coordinate of the second extent to clear.
- prj
- 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. .3.3.3.3.3.3.3.3.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".
Available: GEO
Groups:
sis.ClearBackgroundCache (100,100,200,200, "*APrjNatGrid")