The SQL repository maintains separate item caches and query caches for unrelated item descriptors. Thus, each one can be configured independently—for example, each item cache can have its own size and caching mode. Item descriptors within an inheritance tree also maintain their own query caches. Thus, each item descriptor can set its own Query cache attributes: query-cache-size and query-expire-timeout.

Item descriptors within an inheritance tree (see Item Descriptor Inheritance) share the same item cache; however, related item descriptors set Item cache attributes independently, with one exception: the last-read item descriptor’s item-cache-size setting applies to all item descriptors within the inheritance tree. In order to ensure the desired item cache size, be sure to assign the same item-cache-size to all related item descriptors.

Item cache attributes

You can configure item caches with the following <item-descriptor> attributes:

Attribute

Description

item-cache-size

The maximum number of items of this type to store in the item cache. When this maximum is exceeded, the oldest items are removed from the cache.

Note: Within an inheritance tree, the last-read item descriptor’s item-cache-size setting applies to all item descriptors within the inheritance tree. In order to ensure the desired item cache size, be sure to assign the same item-cache-size to all related item descriptors

Default: 1000

item-expire-timeout

The maximum time in milliseconds that an entry can remain in the item cache before its content becomes stale. After turning stale, the item cache entry is reloaded from the database the next time it is accessed. See Cache Timeout for more information.

Default 0 (cached data is not refreshed)

item-cache-timeout

The time in milliseconds that an item cache entry can remain unused before its content becomes stale. After turning stale, the item cache entry is reloaded from the database the next time it is accessed. See Cache Timeout for more information.

Default: 0 (cached data is not refreshed)

Query cache attributes

You can configure query caches with the following <item-descriptor> attributes:

Attribute

Description

query-cache-size

The maximum number of queries for items of this type to store in the query cache. When this maximum is exceeded, the oldest queries are removed from the cache.

Default: 0

query-expire-timeout

The maximum time in milliseconds that an entry can remain in the query cache before its content becomes stale. After turning stale, the result set is reloaded from the database the next time the entry is accessed. See Cache Timeout for more information.

Default: 0 (items remain cached indefinitely or until invalidated)

Note: While it might be useful to disable caching during evaluation and development by setting cache sizes to 0, be sure to set caches to appropriate sizes for testing and deployment. For information about analyzing cache usage, see Monitoring Cache Usage in this chapter.


Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices