Skip to main content

Caching

The Betflow B2B API caches responses on the server side to improve performance. Understanding the caching behavior helps you build efficient integrations.

How It Works

  • Successful responses (2xx status codes) are cached server-side.
  • Each cache entry is scoped to your account, so you never see another client's cached data.
  • Different request parameters produce different cache entries.

Cache Duration

Most endpoints cache responses for 2 minutes. Error responses (4xx, 5xx) are never cached.

Impact on Your Integration

Since caching is server-side and transparent, there are no special headers you need to send. However, keep the following in mind:

  • Identical requests within the cache window return the same data. If you need fresh data, wait for the cache to expire or vary your request parameters.
  • Different request bodies produce different cache keys. Changing any filter parameter (e.g. page, sport_id, operator_ids) results in a separate cache entry.
  • Empty responses may not be cached. Some endpoints skip caching when the result is an empty array or object, so a subsequent request may return freshly computed data.

Recommendations

  1. Avoid polling the same request repeatedly — responses won't change within the cache window. A 2-minute polling interval matches the cache TTL.
  2. Cache on your side too — for data that doesn't change frequently (reference data like sports, leagues, teams), consider caching responses in your application for longer periods.
  3. Use pagination to vary requests — each page is cached independently, so paginating through results works as expected.