You're viewing **Apigee Edge** documentation.  
[Go to the
**Apigee X** documentation](http://cloud.google.com/apigee/docs/api-platform/cache/persistence-tools). info

When you don't want to use the included shared cache, you can create and configure your own
cache. You can use the cache you create beneath caching policies, rather than using the shared
cache.

You can also create a cache by using an Apigee API. For more,
see [Create
a cache in an environment](https://apidocs.apigee.com/docs/caches/1/routes/organizations/%7Borg_name%7D/environments/%7Benv_name%7D/caches/post).

> [!IMPORTANT]
> **Best practice:** For guidance on which type of cache or persistence to use in different situations, see [Persistence tools in Edge](https://docs.apigee.com/api-platform/cache/persistence-tools).

**Cache limits** : See [Limits](https://docs.apigee.com/api-platform/reference/limits) for the various
limits that apply to caches, such as name and value size, total number of caches, the number
of items in a cache, and expiration.

## About cache encryption

**Edge for Public Cloud:** Cache is encrypted **only** in
[PCI](https://docs.apigee.com/api-platform/faq/pci-configuration-guide-edge-public-cloud)-
and [HIPAA](https://docs.apigee.com/api-platform/faq/hipaa-configuration-guide-edge-public-cloud)-enabled
organizations. Encryption for those organizations is configured during organization
provisioning.

## Defining a cache resource

You can create multiple cache resources in each environment. When you're configuring a caching
policy, you specify whether the policy should use the included shared cache or a cache you
created.

For data segregation, the scope of a cache is limited to the environment in which you created
the cache. (For example, API proxies running in a 'test' environment cannot access data in a
cache running in 'prod'.) Once you create a cache, policies can populate it with any serializable
data. For usage, see [Example: General purpose caching](https://docs.apigee.com/api-platform/cache/optimize-performance-using-cache).

See also: [Response Cache policy](https://docs.apigee.com/api-platform/reference/policies/response-cache-policy).

## Managing your caches

Manage your caches, as described below.

### Edge

To manage your caches using the Edge UI:

1. Sign in to [apigee.com/edge](https://apigee.com/edge).
2. Select **Admin \> Environments \> Caches** in the left navigation bar.
3. To create a cache:
   1. Click **+ Cache**
   2. Enter property values for the new cache, as described below.

      | Name | Description |
      |---|---|
      | Name | Name of the cache. Must be unique in the environment. Reference this name from policies that interact with the cache resource. |
      | Description | Optional. Description of the cache resource. |
      | Expires | Time at which a cache expires. Expiration can be specified as number of seconds after creation, a specified time of day each day, or a specified date. **Note:** The following policies override the expiration settings with the cache entries that they create: [Populate Cache policy](https://docs.apigee.com/api-platform/reference/policies/populate-cache-policy) and [Response Cache policy](https://docs.apigee.com/api-platform/reference/policies/response-cache-policy). |

   3. Click **Add Cache**.
4. To edit a cache:
   1. Position your cursor over the cache in the list to display the actions menu.
   2. Click ![](https://docs.apigee.com/static/api-platform/images/edit-icon-black.png).
   3. Update the cache settings.
   4. Click **Update Cache**.
5. To clear a cache:
   1. Position your cursor over the cache in the list to display the actions menu.
   2. Click ![](https://docs.apigee.com/static/api-platform/images/clear-cache.png).
6. To delete a cache:
   1. Position your cursor over the cache in the list to display the actions menu.
   2. Click ![](https://docs.apigee.com/static/api-platform/images/delete-icon-black.png).
   3. Click **Delete** to confirm the delete operation.

### New Edge UI (Private Cloud)

> [!NOTE]
> **Note:** The New Edge UI is available with Edge for Private Cloud only.

To manage your caches using the New Edge UI:

1. Sign in to the New Edge UI at `http://host:3001/edge`, where <var translate="no">host</var> is the IP address or DNS name of the host running the New Edge UI.
2. Select **Admin \> Environments \> Caches** in the left navigation bar.
3. Select the environment for which you want to configure caches, such as **test** or **prod**.
4. To create a cache:
   1. Click **+ Cache**.
   2. Enter property values for the new cache, as described below.

      | Name | Description |
      |---|---|
      | Name | Name of the cache. Must be unique in the environment. Reference this name from policies that interact with the cache resource. |
      | Description | Optional. Description of the cache resource. |
      | Expires | Time at which a cache expires. Expiration can be specified as number of seconds after creation, a specified time of day each day, or a specified date. **Note:** The following policies override the expiration settings with the cache entries that they create: [Populate Cache policy](https://docs.apigee.com/api-platform/reference/policies/populate-cache-policy) and [Response Cache policy](https://docs.apigee.com/api-platform/reference/policies/response-cache-policy). |

   3. Click **Add Cache**.
5. To edit a cache:
   1. Position your cursor over the cache in the list to display the actions menu.
   2. Click ![Edit icon](https://docs.apigee.com/static/api-platform/images/edit-icon-black.png).
   3. Update the cache settings.
   4. Click **Update Cache**.
6. To clear a cache:
   1. Position your cursor over the cache in the list to display the actions menu.
   2. Click ![Clear cache icon](https://docs.apigee.com/static/api-platform/images/clear-cache.png).
7. To delete a cache:
   1. Position your cursor over the cache in the list to display the actions menu.
   2. Click ![Delete icon](https://docs.apigee.com/static/api-platform/images/delete-icon-black.png).
   3. Click **Delete** to confirm the delete operation.

## Populating cache

You can populate cache during API proxy runtime in the following ways.

- [Populate Cache policy](https://docs.apigee.com/api-platform/reference/policies/populate-cache-policy)
- [Response Cache policy](https://docs.apigee.com/api-platform/reference/policies/response-cache-policy)

> [!NOTE]
> **Note:** Cache keys are limited to a size of 2 KB.