Interceptors are in charge of controlling cache usage in responses to API requests.
To create a cache and use it in calls, you need to use a pair of interceptors:
NOTETo clear the cache, you can use the Cache Invalidation interceptor.
Cached responses are configured at the level of operations. Thus, if you're editing the flow of an API and you can't find any cache interceptors, check the field Operations, above the flow depiction. If you selected the option "All", the cache interceptors will not be displayed. In that case, select a specific operation to view the interceptors and, if desired, drag them into the flow.
To cache a response, the Cache Write interceptor must be inserted into the response flow of an operation. If the request is successful, the Manager will create a cache based on the configurations entered. For the system to use the response stored in memory, you must include the Cache Read interceptor in the operation's request flow.
NOTE
- The "Cache Name" you configure must be the same for both interceptors.
- To delete the response stored in memory, insert the Cache Invalidation interceptor into the request or response flow of an operation, with the "Cache Name" configured as in the Cache Write and Cache Read interceptors.
To clear the entire cache or control its volume, go to Settings > Cache Control. The page only appears if your user has the "Cache Control" permission.
Different in v4By default, only Super Admin users have the Cache Control permission.
NOTECheck the documentation about cache control.
TIPIn cases where the response is handled by a Custom Interceptor, it's necessary to use another Custom Interceptor to interrupt the flow when the Cache Read is populated. This prevents cache treatment error from occurring. The interceptor that will interrupt the flow must be inserted in any position after the Cache Read interceptor.
We use cookies to enhance your experience on our site. By continuing to browse, you agree to our use of cookies.Learn more