Cache locality controls the way that the Generic SQL Adapter (GSA) uses in-memory caching. Specifically, it determines whether the GSA will cache data using its own caching functionality, using the caching functionality of the Oracle Coherence distributed cache application, or a mix of both methods.

Set cache locality either for an entire repository or for individual items. See Setting Cache Locality For an Entire Repository and Setting Cache Locality For a Repository Item Descriptor. The setting for a repository item descriptor will override the setting for an entire repository.

Settings for cache locality are explained in the following table.

Setting

Explanation

local

The GSA uses its own caching functionality within its own Java virtual machine. There is no external caching.

mixed

The GSA uses its own caching functionality and also uses an external distributed caching application as a secondary store.

external

The GSA does not use its own caching functionality. It only stores data in an external distributed caching application.

Setting Cache Locality For an Entire Repository

To set the cache locality for an entire repository:

Setting Cache Locality For a Repository Item Descriptor

To set the cache locality for an individual repository item descriptor:

The following example shows the cache-locality attribute for a repository item descriptor.

<gsa-template>
<item-descriptor name="catalog"
cache-locality="external"
cache-mode="distributedExternal" />
</gsa-template>
Best Practices

If you set the cache locality for repository item descriptors to external, consider using the near cache configuration for Oracle Coherence. Near cache configuration allows Oracle Coherence to store some data in your application server’s Java virtual machine. Since your Oracle ATG Web Commerce server is not caching data in the Java virtual machine itself, allowing Oracle Coherence to keep copies of data locally may improve performance.

Note: If you set the cache locality for repository item descriptors to mixed, do not use the Oracle Coherence near-cache configuration for them. Doing this will duplicate cached data in the Java virtual machine for your Oracle ATG Web Commerce application server.

Use the cacheLocality and defaultCacheNamePrefix properties to control the way that Oracle ATG Web Commerce interacts with Oracle Coherence. See information about defaultCacheNamePrefix in External Cache Naming. See information about cache topologies in the Oracle Coherence documentation (http://www.oracle.com/technetwork/middleware/coherence/documentation/index.html).

The following table shows common cache topologies and example cacheLocality and defaultCacheNamePrefix property settings that may be used for them.

Topology Summary

Example Settings

Oracle ATG Web Commerce local cache, Oracle Coherence distributed cache

cacheLocality=mixed
defaultCacheNamePrefix=dist-cache

Oracle Coherence local cache, Oracle Coherence distributed cache

cacheLocality=external
defaultCacheNamePrefix=near-cache

Entire cache in Oracle Coherence, external to JVM

cacheLocality=external
defaultCacheNamePrefix=remote-cache


Copyright © 1997, 2012 Oracle and/or its affiliates. All rights reserved.

Legal Notices