Customizing the Spatial Data Cache Specifying the Security Configuration

Introduction to MapViewer 1-31

1.5.2.6 Customizing the Spatial Data Cache

You can customize the in-memory cache that MapViewer uses for spatial data by using the spatial_data_cache element. For example: spatial_data_cache max_cache_size=64 report_stats=true You can specify the following information as attributes of the spatial_data_ cache element: ■ The max_cache_size attribute specifies the maximum number of megabytes MB of in-memory cache. Default value: 64 ■ The report_stats attribute, if set to true, instructs the MapViewer server to periodically every 5 minutes output cache statistics, such as the number of objects cached, the total size of cache objects, and data relating to the efficiency of the internal cache structure. The statistics are provided for each data source and for each predefined theme. They can help you to determine the optimal setting of the in-memory cache. For example, if you want to pin all geometry data for certain themes in the memory cache, you need to specify a max_cache_size value that is large enough to accommodate these themes. Default value: false The spatial data cache is always enabled by default, even if the element is commented out in the configuration file. To completely disable the caching of spatial data, you must specify the max_cache_size attribute value as 0 zero. For detailed information about the caching of predefined themes, see Section 2.3.1.5 .

1.5.2.7 Specifying the Security Configuration

You can use the security_config element to specify whether MapViewer should reject info_request elements in requests. An info_request element is a type of request from a client that asks MapViewer to execute a simple SQL statement and return the result rows in plain text or XML format. This request is often used by MapViewer applications written in JSP to identify features displayed on a map, or to run simple spatial search queries. However, if the MapViewer data source information is exposed, malicious attackers might be able to abuse this capability and obtain sensitive information. To prevent this from happening, you can make sure MapViewer always connects to a database schema that has very limited access rights and hosts only non-sensitive information, and you can also reject all info_request requests by specifying the security_config element as follows: security_config disable_direct_info_request true disable_direct_info_request security_config Note: The disk-based spatial cache, which was supported in the previous release, is no longer supported, because performance tests have shown that disk-based spatial caching was often less efficient than fetching spatial objects directly from the database when needed that is, in cases where the cached objects frequently did not need to be retrieved again after caching. 1-32 Oracle Fusion Middleware Users Guide for Oracle MapViewer Note, however, that this setting affects some Mapviewer features. For example, the identify method of the MapViewer Java API will no longer work, and applications will need to implement their own identify method through other means.

1.5.2.8 Registering a Custom Image Renderer