Transforming XML to DOM can incur considerable overhead. The ATG platform includes a separate document cache for XML documents, located at /atg/dynamo/service/xml/DocumentCache. This component can be used to cache the results of an XML to DOM parser. The servlet bean XMLTransform uses a document cache for XML input documents, and another for XSL stylesheet templates.

The XML document cache is similar to ATG’s file cache. It uses an LRU (least-recently-used) policy to maintain the cache, determining which entries to flush based upon expiration times and timestamps.

The XML document cache has the following configurable properties. A value of -1 indicates that the value is unlimited.

Property

Default

Type

Description

maximumCacheEntries

-1

int

Maximum number of cache entries.

maximumCacheSize

2000000

int

Maximum size of the cache, in bytes

maximumEntryLifetime

-1

long

Time in milliseconds before a cache entry expires.

maximumEntrySize

-1

int

Maximum size for any single entry in the cache, in bytes.

The following read-only properties provide information about cache efficiency:

Property

Description

accessCount

Total number of cache accesses.

hitCount

Number of cache hits.

hitRatio

Number of cache hits divided by total number of cache accesses.

timeoutCount

Number of times out of date entries were invalidated.

usedCapacity

Ratio of cache entries to maximum cache entries.

usedMemory

Amount of memory in bytes used by cache entries (includes keys).

 
loading table of contents...