# Cache duration for API response

**URL:** <https://discuss.dev.twitch.com/t/cache-duration-for-api-response/1334>\
**Category:** API\
**Created:** [December 19, 2014, 8:06pm UTC](https://discuss.dev.twitch.com/t/cache-duration-for-api-response/1334 "2014-12-19T20:06:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cejast](https://avatars.discourse-cdn.com/v4/letter/c/f07891/32.png) [@cejast](https://discuss.dev.twitch.com/u/cejast)\
**Post date:** [December 19, 2014, 8:06pm UTC](https://discuss.dev.twitch.com/t/cache-duration-for-api-response/1334/1 "2014-12-19T20:06:18Z")

</div>

So I’ve been been playing around with an idea and have been hitting the _/games/top_ endpoint - I’ve noticed that the response seems to be cached across at least 2 instances (probably more under load) - can anyone give an idea of how frequently the cache gets refreshed and whether or not it’s refreshed at approximately the same time for all instances?

---

<div class="post-metadata">

**Author:** ![coolacid](https://avatars.discourse-cdn.com/v4/letter/c/58956e/32.png) [@coolacid](https://discuss.dev.twitch.com/u/coolacid)\
**Post date:** [December 19, 2014, 8:49pm UTC](https://discuss.dev.twitch.com/t/cache-duration-for-api-response/1334/2 "2014-12-19T20:49:58Z")

</div>

I also would like to see an answer here. I’ve seen this behaviour both with the followers and stream endpoint.

At times, it can take anywhere up to 3-5 mins for one of the instances to get up to date with the other.

---

<div class="post-metadata">

**Author:** ![Fugiman](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/fugiman/32/108_2.png) [@Fugiman](https://discuss.dev.twitch.com/u/Fugiman)\
**Post date:** [December 20, 2014, 12:17am UTC](https://discuss.dev.twitch.com/t/cache-duration-for-api-response/1334/3 "2014-12-20T00:17:00Z")

</div>

Different endpoints are cached for different periods of time at the server level, from anywhere between a minute to an hour. We don’t publish cache times as they can be changed at any time depending on server load, but a rule of thumb is you should never hit the same endpoint more than once a minute.

---

<div class="post-metadata">

**Author:** ![system](https://d2opxh93rbxzdn.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://discuss.dev.twitch.com/u/system)\
**Post date:** [December 30, 2014, 12:17am UTC](https://discuss.dev.twitch.com/t/cache-duration-for-api-response/1334/4 "2014-12-30T00:17:45Z")

</div>

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
