You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The method "setExpiryTime" in the Layer class has the following description:
/**
Specifies the time of the layer's most recent dataset update. If greater than zero, the layer ignores and
eliminates any previously cached data older than the time specified, and requests new information from the data
source. If zero, the layer uses any expiry times intrinsic to the layer, typically initialized at layer
construction. The default expiry time is 0, thereby enabling a layer's intrinsic expiration criteria.
@param expiryTime the expiry time of any cached data, expressed as a number of milliseconds beyond the epoch.
@see System#currentTimeMillis() for a description of milliseconds beyond the epoch.
*/
And reading through the WorldWind Java Forum there are several posts claiming that using "setExpiryTime(System.currentTimeMillis())" will invalidate a layer's tile cache both in memory and on disc causing new tiles to be retrieved from the source.
However, when I use this method as described nothing seems to happen. Even though the "setExpiryTime" seemed to execute without issue the return value for "tile.getLevel().getExpiryTime()" is the default value of 0 (zero).
Expected behavior:
The documentation says that setting "setExpiryTime(System.currentTimeMillis())" should invalidate the tiles for the specified layer both in memory and on disc and force new tiles to be retrieved from their source.
Actual behavior:
The cached tiles are used instead of fetching the tiles from the source.
Steps to Reproduce
Call layer.setExpiryTime(System.currentTimeMillis()); for the desired map layer
Reproduces how often:
Always
Operating System and Version
Windows 10 version 1903
Additional Information
Maybe I'm missing something. Are there other flags that need to be set or other calls that need to be made to mark a layer's current cache as expired and force tiles to be downloaded from their source?
Edit
I decided to take another approach to the problem I was trying to resolve: providing a method for a client to delete local tile cache for a selected map.
But the issue described above still exists, and I would consider it to be a "bug" (at least based on the documentation).
However, I wonder if the "setExpiryTime" method only works if a layer's XML config file contains a "LastUpdate" node? Our layers do not contain this node. I suppose it might be possible that the "setExpiryTime" method requires the existence of this node.
Also, I was asked to post this issue here to get your guidance/input after initially posting the issue on the Community Edition site: WorldWindEarth#73
The text was updated successfully, but these errors were encountered:
Description
The method "setExpiryTime" in the Layer class has the following description:
/**
*/
And reading through the WorldWind Java Forum there are several posts claiming that using "setExpiryTime(System.currentTimeMillis())" will invalidate a layer's tile cache both in memory and on disc causing new tiles to be retrieved from the source.
However, when I use this method as described nothing seems to happen. Even though the "setExpiryTime" seemed to execute without issue the return value for "tile.getLevel().getExpiryTime()" is the default value of 0 (zero).
Expected behavior:
The documentation says that setting "setExpiryTime(System.currentTimeMillis())" should invalidate the tiles for the specified layer both in memory and on disc and force new tiles to be retrieved from their source.
Actual behavior:
The cached tiles are used instead of fetching the tiles from the source.
Steps to Reproduce
Call layer.setExpiryTime(System.currentTimeMillis()); for the desired map layer
Reproduces how often:
Always
Operating System and Version
Windows 10 version 1903
Additional Information
Maybe I'm missing something. Are there other flags that need to be set or other calls that need to be made to mark a layer's current cache as expired and force tiles to be downloaded from their source?
Edit
I decided to take another approach to the problem I was trying to resolve: providing a method for a client to delete local tile cache for a selected map.
But the issue described above still exists, and I would consider it to be a "bug" (at least based on the documentation).
However, I wonder if the "setExpiryTime" method only works if a layer's XML config file contains a "LastUpdate" node? Our layers do not contain this node. I suppose it might be possible that the "setExpiryTime" method requires the existence of this node.
Also, I was asked to post this issue here to get your guidance/input after initially posting the issue on the Community Edition site: WorldWindEarth#73
The text was updated successfully, but these errors were encountered: