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:
- Sign in to apigee.com/edge.
- Select Admin > Environments > Caches in the left navigation bar.
- To create a cache:
- Click + Cache
- 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. - Click Add Cache.
- To edit a cache:
- Position your cursor over the cache in the list to display the actions menu.
- Click .
- Update the cache settings.
- Click Update Cache.
- To clear a cache:
- Position your cursor over the cache in the list to display the actions menu.
- Click .
- To delete a cache:
- Position your cursor over the cache in the list to display the actions menu.
- Click .
- Click Delete to confirm the delete operation.
Classic Edge (Private Cloud)
To manage your caches using the Classic Edge UI:
- Sign in to
http://ms-ip:9000
, where ms-ip is the IP address or DNS name of the Management Server node. - Select APIs > Environment Configuration > Caches.
- Select the environment for which you want to configure caches, such as test or prod.
- To create a cache:
- Click Edit.
- Click + Cache.
- 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
, whereHH
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).
- Click Save.
- To edit a cache:
- Click Edit.
- Modify the values for the cache.
- Click Save.
- To clear a cache clear click Clear adjacent to the cache you want to clear.
- To delete a cache:
- Click Edit.
- Click Delete adjacent to the cache you want to delete.
Populating cache
You can populate cache during API proxy runtime in the following ways.