Creating and editing an environment cache

You're viewing Apigee Edge documentation.
Go to the Apigee X documentation.
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.

Cache limits: See 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- and HIPAA-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.

See also: 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.
  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 and 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 .
    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 .
  6. To delete a cache:
    1. Position your cursor over the cache in the list to display the actions menu.
    2. Click .
    3. Click Delete to confirm the delete operation.

Classic Edge (Private Cloud)

To manage your caches using the Classic Edge UI:

  1. Sign in to http://ms-ip:9000, where ms-ip is the IP address or DNS name of the Management Server node.
  2. Select APIs > Environment Configuration > Caches.
  3. Select the environment for which you want to configure caches, such as test or prod.
  4. To create a cache:
    1. Click Edit.
    2. Click + Cache.
    3. Enter property values for the new cache, as described below.
      Property Name Default Value Description
      Name N/A Name of the cache. Must be unique in the environment. Reference this name from policies that interact with the cache resource.
      Description N/A Optional description of the cache resource.
      Expiration Type Timeout in Seconds Sets how cache entries will be expired. Entry time to live can be a specified 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 and Response Cache policy.
      Expiration For timeout in seconds: 300 (seconds)

      For time of day: 12:00:00

      For date: current date (dd-MM-yyyy)

      Configuration setting (either integer or dateTime) for the selection you made in the Expiration dropdown.

      Enter time of day in the format HH:mm:ss, where HH represents the hour on a 24-hour clock. For example, 14:30:00 for 2:30 in the afternoon.

      For the time of day, the default locale and time zone will vary depending on where the code is running (which isn't knowable at configuration time).

    4. Click Save.
  5. To edit a cache:
    1. Click Edit.
    2. Modify the values for the cache.
    3. Click Save.
  6. To clear a cache clear click Clear adjacent to the cache you want to clear.
  7. To delete a cache:
    1. Click Edit.
    2. Click Delete adjacent to the cache you want to delete.

Populating cache

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