Enabling caching and remote synchronization
To use caching, you must configure and enable caching in the Storage Layer configuration file (cd_storage_conf.xml) as follows:
- Enable cache bindings for dynamic Component Presentations
- Unless Content Deployer and WebForms run in the same Web Application, configure Remote Synchronization to synchronize the caches of the Storage Layers used by the Deployer, and the Storage Layer used by WebForms.
Refer to Identifying used Storage Layer instances to identify the correct Storage Layer configuration file(s).
To enable caching in your Storage Layer configuration file(s), add the configuration shown below in the Bindings element, inside the Global element:
<ObjectCache Enabled="true">
<!--
Determines what policy the cache will use to determine what
objects stay in the cache and what objects are removed from
the cache when it is full.
-->
<Policy Type="LRU" Class="com.tridion.cache.LRUPolicy">
<Param Name="Size" Value="512"/>
</Policy>
<!--
The Features element specifies classes that add additional
functionality to the cache.
-->
<Features>
<Feature Type="DependencyTracker"
Class="com.tridion.cache.DependencyTracker"/>
</Features>
<CacheBindings>
<!--
These are the basic bindings for the classes most commonly
instantiated by the Broker. These classes should usually be used.
-->
<CacheBinding Name="BinaryMeta"
Class="com.tridion.broker.binaries.meta.
CachedBinaryMetaHome"/>
<CacheBinding Name="ComponentMeta"
Class="com.tridion.broker.components.meta.
CachedComponentMetaHome"/>
<CacheBinding Name="ComponentPresentationMeta"
Class="com.tridion.broker.componentpresentations.meta.
CachedComponentPresentationMetaHome"/>
<CacheBinding Name="LinkInfo"
Class="com.tridion.broker.linking.CachedLinkInfoHome" />
<CacheBinding Name="PageMeta"
Class=
"com.tridion.broker.pages.meta.CachedPageMetaHome"/>
<CacheBinding Name="XSLT"
Class="com.tridion.broker.xslt.CachedXSLTHome"/>
<!--
These classes are used for Dynamic Component Presentations.
-->
<CacheBinding Name="ASPComponentPresentation"
Class="com.tridion.broker.componentpresentations.
CachedComponentPresentationHome"/>
<CacheBinding Name="JSPComponentPresentation"
Class="com.tridion.broker.componentpresentations.
CachedComponentPresentationHome"/>
<CacheBinding Name="TextComponentPresentation"
Class="com.tridion.broker.componentpresentations.
CachedComponentPresentationHome"/>
<CacheBinding Name="XMLComponentPresentation"
Class="com.tridion.broker.componentpresentations.
CachedComponentPresentationHome"/>
<CacheBinding Name="Template"
Class="com.tridion.broker.xslt.CachedXSLTHome"/>
</CacheBindings>
<!--
The optional RemoteSycnhronization element specifies a remote
Cache Channel Service. The remote Cache Channel Service sends
messages between caches that run on separate virtual machines.
(For example, if the Broker and the Deployer run on separate
virtual machines.) The Cache Channel Service must be running
and listening on the configured host and port for remote
synchronization to function. If this element is omitted, the
cache does not use any inter-virtual machine cache
communication. You must use the RemoteSynchronization element
in conjunction with the Cache Channel service in order for
objects to be updated or removed from the Broker's object
cache when they are published or unpublished using the
Deployer.
-->
<RemoteSynchronization Host="127.0.0.1" Port="1099"
Queuesize="20" ServiceMonitorInterval="10000"/>
</ObjectCache>