Pitney Bowes MapXtreme User Manual

Page 228

Advertising
background image

Chapter 11: Accessing Data from a DBMS

Working with the Cache

MapXtreme v7.1

235

Developer Guide

The TableInfoServer Object and the CacheSettings Property

When a table is added to the map, the cache is enabled by default but can be further configured
using the CacheSettings property of the TableInfo object. This property has four possible values:
ON, OFF, ALL, USER, with ON being the default for TableInfoServer, OFF is default for other
TableInfo objects.

Parameter

Description

OFF

A value of 'Off' means that the table will not use the cache at all. All data
operations will go directly to the database server.

ON

Caching is enabled and the table automatically performs caching based on the
map view (center/zoom). The user may additionally control the cache through the
cache constraint objects.

The cached table maintains the record cache in a fashion that best improves
standard map operations. The cache is maintained to contain, at a minimum, all
the records displayed in the current window of each Map the table is in (and
visible). Once an initial map window has been cached, pan and zoom operations
that fall entirely within the initial extents of the cache access the cached records
and do not need to query the database. If a pan/zoom operation falls outside the
cached region, the table adds the new map window MBR (view) to the cache and
obtains the missing records from the database server and adds them to the cache.
The old map view is not initially discarded; rather, an internal history of previous
map views is maintained. To avoid having a cache that grows excessively large,
there are controls that can be placed on the table's cache to determine when to
discard old cached views (map window MBR regions). These controls are
properties of the CacheParameters object, which can be set at the time the table is
initially opened. This allows the developer to set limits on the maximum amount of
memory or disk space used by the cache, the maximum number of previous map
window views to maintain in the history, the maximum number of records to
maintain in the cache, and/or the maximum amount of time old map window views
are allowed to remain in the cache history. These limits can be used individually or
in combination to provide the cache management that best suits the application's
needs.

ON is the default setting for the CacheParameter setting for a TableInfoServer. For
other TableInfo data sources, the default is OFF. For example, TAB files are not
cached by default.

Advertising