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 |
---|---|
| The GSA uses its own caching functionality within its own Java virtual machine. There is no external caching. |
| The GSA uses its own caching functionality and also uses an external distributed caching application as a secondary store. |
| 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:
Edit the properties file for the repository component.
Set the
cacheLocality
property to one of the cache locality settings: local, mixed, or external.cacheLocality=external
Restart your Oracle ATG Web Commerce server.
Setting Cache Locality For a Repository Item Descriptor
To set the cache locality for an individual repository item descriptor:
Edit the repository definition file for the repository item. Find the
item-descriptor
element for the repository item descriptor.Set the value of the cache-locality attribute to one of the cache locality settings: local, mixed, or external.
Restart your Oracle ATG Web Commerce server.
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 |
|
Oracle Coherence local cache, Oracle Coherence distributed cache |
|
Entire cache in Oracle Coherence, external to JVM |
|