Optional Caching Policies


This article explains how you can utilize API cache functionality for your GET requests, delivering enhanced performance and scalability to your integrations. By leveraging the optional headers, you can tailor caching behaviour to fit your specific needs while benefiting from faster response times, resulting in a smoother and more responsive integration.

To leverage the power of API caching in your integrations, follow the steps below:

Check API Developer Portal. For APIs that support caching, you will find documentation that includes two optional headers: X-Use-Cache and X-Cache-Duration.

Implement Cache Headers. To implement caching in your integration, follow these steps:

  • Enable Cache. Include the "X-Use-Cache" header in your GET requests to enable or disable caching for a particular request. Set the header value to "true" to enable cache or "false" to disable cache.
  • Specify Cache Duration. Include the "X-Cache-Duration" header in your requests to define the time period, in milliseconds, for which a response will be cached. Set the value to the desired duration for caching the response.

Sharing Cached Responses. Cached responses are shared among users within the same company. This sharing reduces redundant data retrieval and improves overall performance across the organization.

Adjusting Cache Duration. Customize the cache duration based on the specifics of your integration. Consider real-time requirements for critical processes like orders, subscriptions, and invoices when setting cache duration.

Was this article helpful?

0 out of 0 found this helpful

Add comment

Please sign in to leave a comment.