CACHE GUIDE

Balance flight-data freshness, speed, and cost

Set the acceptable cache age on every request and use response metadata to explain exactly what your user received.

Why flight search benefits from caching

Flight searches can be slow because they depend on upstream websites, network conditions, and multiple result sources. Many users also repeat equivalent searches while comparing dates or returning to the same conversation. A shared Redis cache can answer those requests quickly without fetching identical provider data again.

Flight MCP normalizes the search before deriving its cache key. Equivalent requests can therefore share data even when different API keys submit them. The requested cache period does not fragment the underlying search identity.

Choose cacheTtlSeconds per request

cacheTtlSeconds accepts values from 60 seconds through 259,200 seconds, or three days. The value means “use an existing result only if it is no older than this.” If no sufficiently fresh result exists, the API fetches new provider data.

  • 60–300 seconds: interactive price checks where freshness matters most.
  • 15–60 minutes: itinerary exploration and repeated agent conversations.
  • Several hours to 3 days: demos, route discovery, and workflows where indicative results are sufficient.
Cache hits are not billable

Only a successful request that fetches new provider data consumes a monthly plan call. Cached responses are excluded from the usage allowance.

Read the freshness metadata

Check meta.cached to distinguish a cache hit from a provider fetch. cacheExpiresAt describes the stored result’s expiry, while durationMs reports end-to-end response time. Quota metadata shows the monthly limit, used calls, remaining calls, and reset time.

Applications should label older results appropriately. An agent can say that a result was retrieved from cache and offer to refresh when the user needs a purchase-time price check.

A practical default

Start with 300 seconds for an interactive application. Increase the value for automated agents that repeat route discovery, and reduce it when the user explicitly asks for the latest available price. Always refresh before a high-confidence purchase decision.

Review the complete cache contract and compare monthly plan limits before choosing a production default.