= Creating Caches
{brandname} servers do not provide default caches. To store data in your cluster, you must first define a cache.

.Prerequisites
A REST client. The following procedures use `curl` but you can use any client.

.Procedure
Invoke a `POST` request to create a new cache.

[source,options="nowrap",subs=attributes+]
----
include::rest_examples/curl_create_mycache.adoc[]
----

The preceding command creates a new cache named `mycache` that uses a distributed configuration in synchronous mode. Whenever you add data to `mycache`, {brandname} stores it in a subset of nodes across the cluster using an algorithm that distributes the data evenly. With this configuration {brandname} also propagates data across nodes synchronously, which means that sending nodes must wait for receiving nodes to respond before operations can continue.

If the `POST` request is successful, it returns `HTTP/1.1 200 OK`.

.Verification
Do either of the following from any node in the cluster to verify the cache:

* Retrieve the size of the cache.
+
[source,options="nowrap",subs=attributes+]
----
include::rest_examples/curl_retrieve_mycache_size.adoc[]
----
+
The cache is empty so the response is `0`.

* Retrieve the cache configuration.
+
[source,options="nowrap",subs=attributes+]
----
include::rest_examples/curl_retrieve_mycache_config.adoc[]
----
