Skip to content

Support response caching of API responses #134

Description

@jezzsantos

Response caching, in web APIs and web applications is a complex topic, and can refer to many related mechanisms, lets be clear on the main mechanisms involved:

  1. HTTP response headers, defined by the server on responses. (This is not actually caching, rather an instruction for a client)
  2. Output caches on the server controlled by the server, used to serve responses (usually per unique request, varying by all parameters, path and query)
  3. HTTP client caching, where clients/intermediaries act on the declared HTTP response headers from server (usually performed by intermediary infrastructure)
  4. Client application caching, where clients (like JavaScript frameworks) maintain their own caches in the browser, to prevent themselves reissuing requests to servers.

These are the most common types, there might be others.

All these mechanisms are in play at all times, and are all orthogonal and mutually exclusive to each other.

Which means we need to take great care to manage them or coordinate them with other mechanisms that may also be in play.

Caching is also (one of those things) that is optional until it is needed, and then great care should be applied since cache invalidation is a huge problem to deal with, particularly with usability when it comes to volatile data.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions