[id='cluster-cache-loader_{context}']
= Cluster cache loaders
`ClusterCacheLoader` retrieves data from other {brandname} cluster members but
does not persist data. In other words, `ClusterCacheLoader` is not a cache
store.

[WARNING]
====
`ClusterLoader` is deprecated and planned for removal in a future version.
====

`ClusterCacheLoader` provides a non-blocking partial alternative to state
transfer. `ClusterCacheLoader` fetches keys from other nodes on demand if those
keys are not available on the local node, which is similar to lazily loading
cache content.

The following points also apply to `ClusterCacheLoader`:

* Preloading does not take effect (`preload=true`).
* Fetching persistent state is not supported (`fetch-state=true`).
* Segmentation is not supported.

[discrete]
== Cluster cache loader configuration

.XML
[source,xml,options="nowrap",subs=attributes+,role="primary"]
----
include::xml/persistence_cluster_loader.xml[]
----

.JSON
[source,json,options="nowrap",subs=attributes+,role="secondary"]
----
include::json/persistence_cluster_loader.json[]
----

.YAML
[source,yaml,options="nowrap",subs=attributes+,role="secondary"]
----
include::yaml/persistence_cluster_loader.yaml[]
----

.ConfigurationBuilder
[source,java,options="nowrap",subs=attributes+,role="secondary"]
----
include::code_examples/PersistenceClusterLoader.java[]
----

[role="_additional-resources"]
.Additional resources
* link:{configdocroot}infinispan-config-{schemaversion}.html[{brandname} configuration schema]
* link:{javadocroot}/org/infinispan/persistence/cluster/ClusterLoader.html[ClusterLoader]
* link:{javadocroot}/org/infinispan/configuration/cache/ClusterLoaderConfiguration.html[ClusterLoaderConfiguration]
