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

Cache loans and holds server-side

XMLWordPrintable

    • SIMPLY S16 July 21 - August 4, SIMPLY S17 August 4 - 18

      When the circulation manager gets a request for a patron's shelf feed, it expects the client to cache the resulting feed. This causes a number of problems that could be avoided by caching on the server side and allowing the client to fetch a feed whenever it wants.

      Each patron would have a timestamp representing the last time their shelf feed changed. If the patron asks for a shelf feed and the information is 'fresh', we generate a new feed based on the loan and holds data we already have. The resulting feed should have a Cache-Control header set to max-age=0.

      We don't need to actually cache the OPDS feed itself, and in fact we shouldn't, since that feed contains personal reading information and we'd need to be very careful with it. What we're caching is the loan and hold information we got from the vendor – that's the part that's expensive to fetch. We already have this information, and all we're doing is giving ourselves permission to sit with it for a while instead of always asking for newer information.

      Creation or deletion of a loan or hold through the circulation manager will immediately invalidate that patron's 'cache'.

      We don't have complete control over cache invalidation – someone might use a vendor's website or app to check out a book, and we wouldn't hear about it – so we'll still need to do time-based invalidation on the server side. That is, we will call out to all the vendors if it's been more than thirty minutes (or whatever) since we checked with them, even if as far as we know nothing has changed.

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

              Created:
              Updated:
              Resolved: