[[cli_cache_loader]]
=== Command-Line Interface cache loader
The Command-Line Interface (CLI) cache loader is a cache loader implementation
that retrieves data from another {brandname} node using the CLI. The node to
which the CLI connects to could be a standalone node, or could be a node that
it's part of a cluster. This cache loader is read-only, so it will only be
used to retrieve data, and hence, won't be used when persisting data.

The CLI cache loader is configured with a connection URL pointing to the
{brandname} node to which connect to. Here is an example:

[NOTE]
====
Details on the format of the URL and how to make sure a node can
receive invocations via the CLI can be found in the link:#command_line_interface[Command-Line Interface chapter].
====

//Exclude segmentation from productized docs.
ifndef::productized[]
[NOTE]
====
The Command-Line Interface (CLI) cache loader does not support segmentation.
====
endif::productized[]

[source,xml]
----

<persistence>
   <cli-loader connection="jmx://1.2.3.4:4444/MyCacheManager/myCache" />
</persistence>

----

[source,java]
----

ConfigurationBuilder b = new ConfigurationBuilder();
b.persistence()
    .addStore(CLInterfaceLoaderConfigurationBuilder.class)
    .connectionString("jmx://1.2.3.4:4444/MyCacheManager/myCache");

----
