Uploaded image for project: 'SimplyE 2.0'
  1. SimplyE 2.0
  2. SIMPLY-2627

Normalize caching behavior across platforms and across type of resource being cached

XMLWordPrintable

    • Icon: Epic Epic
    • Resolution: Done
    • Icon: Medium Medium
    • None
    • None
    • None
    • Improve HTTP caching

      A client can expect to receive a number of different types of resources that may be subject to HTTP caching rules:

      • OPDS feeds describing lists of books – catalogs, loan feeds etc.
      • OPDS feeds describing lists of libraries (from the library registry)
      • Authentication For OPDS documents
      • Documents from the User Profile Management Protocol
      • Cover images
      • Licensing documents – ACSM files or LCP License Status Documents
      • Manifest documents – audiobook or otherwise

      Currently we have a mishmash of rules around caching which are not consistently applied across platforms.

      Fortunately, it's conceptually easy to establish a source of truth in this matter: the server can send a Cache-Control header to give clients advice on caching resources.

      Depending on the resource, a server may also be able to send the ETag and Last-Modified headers, which will allow a client to support Conditional HTTP GET. This will let us set the Cache-Control values lower than we would otherwise be able to.

      On the server side, we should send all these headers with reasonable values whenever possible.

      On the client side, every platform we support should make use of these headers when present, rather than substituting its own judgement.

      When the Cache-Control header is not present (as can happen with old and alternate implementations), every platform should substitute its own judgement using a standard set of default caching rules TBD.

            Unassigned Unassigned
            leonardrichardson Leonard Richardson [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: