Working with the cache, What is the cache, How the cache works – Pitney Bowes MapXtreme User Manual

Page 227: What is the cache? how the cache works

Advertising
background image

Chapter 11: Accessing Data from a DBMS

Working with the Cache

MapXtreme v7.1

234

Developer Guide

Working with the Cache

Knowing how to work with cache in MapXtreme enables you to improve your application’s
performance. The sections below describe what the cache is, how it works in the MapXtreme object
model, and the CacheSettings property of the TableInfoServer object.

What Is the Cache?

In place of local files, applications can access MapXtreme features from a remote database. In place
of reading these records from the database each time the map needs to be acted upon, your
MapXtreme application can temporarily store these records in the cache. This limits the number of
calls between the application and the remote database. Records in a server table can be cached to
improve the performance of your application (e.g., drawing, thematics, labeling, etc.). Server table
data is cached internally as it is read and drawn to the Map window. All subsequent redraws read
from this cache instead of going to the server database for the same data. The cache is able to offer
significant redraw performance improvement.

There are several settings that developers can use to customize cache usage. The cache can be
enabled (or disabled) when the server table is added by specifying the values for the CacheSettings
property of the TableInfoServer object and is On by default.

How the Cache Works

For each record that is cached, each attribute data value is stored in memory and each feature
object is stored on disk in a temporary Rtree file. For tables with a lot of records and/or a large
record size (for example, number of bytes per record for the attribute data), caching may use a
significant amount of memory. If an application tries to cache too much data, too much virtual
memory usage may be required, which can degrade performance. Applications should be selective
about how the cache is utilized. MapXtreme offers a variety of mechanisms for controlling the cache.

Advertising