Clearing Metadata Cache for a Data Source Administrative Clearing Spatial Data Cache for a Theme Administrative

MapViewer XML Requests: Administrative and Other 7-11 ■ The highlight attribute indicates whether or not the style is used as only a highlight style. ■ The description attribute identifies the description as specified in the style definition.

7.6 Managing In-Memory Caches

MapViewer uses two types of in-memory cache: ■ Metadata cache for mapping metadata, such as style, theme, and base map definitions, and the SRID value for SDO_GEOMETRY columns in tables in the cache ■ Spatial data cache for predefined themes the geometric and image data used in generating maps The use of these caches improves performance by preventing MapViewer from accessing the database for the cached information; however, the MapViewer displays might reflect outdated information if that information has changed in the database since it was placed in the cache. If you want to use the current information without restarting MapViewer, you can clear invalidate the content of either or both of these caches. If a cache is cleared, the next MapViewer request will retrieve the necessary information from the database, and will also store it in the appropriate cache.

7.6.1 Clearing Metadata Cache for a Data Source Administrative

As users request maps from a data source, MapViewer caches such mapping metadata as style, theme, and base map definitions for that data source, as well as the SRID value for SDO_GEOMETRY columns in tables such as when rendering a theme for the first time. This prevents MapViewer from unnecessarily accessing the database to fetch the mapping metadata. However, modifications to the mapping metadata, such as those you make using the Map Builder tool, do not take effect until MapViewer is restarted. If you want to use the changed definitions without restarting MapViewer, you can request that MapViewer clear that is, remove from the cache all cached mapping metadata and cached table SRID values for a specified data source. Clearing the metadata cache forces MapViewer to access the database for the current mapping metadata. The clear_cache element clears the MapViewer metadata cache. It has the following definition: ELEMENT non_map_request clear_cache ELEMENT clear_cache EMPTY ATTLIST clear_cache data_source CDATA REQUIRED The data_source attribute specifies the name of the data source whose metadata is to be removed from the MapViewer metadata cache. The following example clears the metadata for the mvdemo data source from the MapViewer metadata cache: ?xml version=1.0 standalone=yes? non_map_request clear_cache data_source=mvdemo 7-12 Oracle Fusion Middleware Users Guide for Oracle MapViewer non_map_request The DTD for the response to a clear_cache request has the following format: ELEMENT non_map_response clear_cache ELEMENT clear_cache EMPTY ATTLIST clear_cache succeed true | false REQUIRED For example: ?xml version=1.0 ? non_map_response clear_cache succeed=true non_map_response

7.6.2 Clearing Spatial Data Cache for a Theme Administrative

MapViewer caches spatial data geometries or georeferenced images for a predefined theme as it loads the data from the database into memory for rendering, unless it is told not to do so. MapViewer does not cache the data for dynamic or JDBC themes. Thus, if a predefined theme has been frequently accessed, most of its data is probably in the cache. However, if the spatial data for the theme is modified in the database, the changes will not be visible on maps, because MapViewer is still using copies of the data from the cache. To view the modified theme data without having to restart MapViewer, you must first clear the cached data for that theme. The clear_theme_cache element clears the cached data of a predefined theme. It has the following definition: ELEMENT non_map_request clear_theme_cache ELEMENT clear_theme_cache EMPTY ATTLIST clear_theme_cache data_source CDATA REQUIRED theme CDATA REQUIRED The data_source attribute specifies the name of the data source. The theme attribute specifies the name of the predefined theme in that data source. The following example clears the cached spatial data for the predefined theme named STATES in the mvdemo data source: ?xml version=1.0 standalone=yes? non_map_request clear_theme_cache data_source=mvdemo theme=STATES non_map_request The DTD for the response to a clear_theme_cache request has the following format: ELEMENT non_map_response clear_theme_cache ELEMENT clear_theme_cache EMPTY ATTLIST clear_theme_cache succeed true | false REQUIRED For example: ?xml version=1.0 ? non_map_response MapViewer XML Requests: Administrative and Other 7-13 clear_theme_cache succeed=true non_map_response

7.7 Editing the MapViewer Configuration File Administrative