Skip to main content

 

Hi,

Is there a way to not cache the response results of the event segmentation API?
 

The curl request is below:

curl --location -g --request GET 'https://amplitude.com/api/2/events/segmentation?e={"event_type": "_all"}&start=20240701&end=20240730&m=totals&i=30'
--header 'Authorization: Basic xxx'

It looks like the value of data.series in the response has been cached for several hours.

Is there a way to arbitrarily control the cache?

Hello Jeong,

Based on the information available, it appears that the caching of API responses is a feature of Amplitude's system. This is done to ensure efficient processing of requests, especially those that may have a longer duration. The cached results are typically refreshed after a certain period, which can sometimes lead to the same results being returned for multiple queries within that period.

Unfortunately, there is no parameter or header that can be submitted with the request to bypass this caching feature or to control the cache arbitrarily. The system is designed this way to manage the load and ensure optimal performance.

However, if you're experiencing significant issues with this, I would recommend providing feedback directly to our product team via the Amplitude widget at the bottom right corner on the UI > Give Feedback. A detailed description of your use case and how you visualize utilization of the platform without the caching behavior would help our Product team understand the importance of the request better.

I hope this information is helpful. Let me know if you have any other questions.

Best Regards,

Jacenda


P.S. Checkout upcoming events and user meetups on our events page.

Reply