Comment 2 for bug 1541559

Revision history for this message
Jeff Davis (jdavis-sitka) wrote :

For authenticated users, we want to avoid constantly looking up information about their account (patron ID and existing transactions, including title metadata). We should retrieve that information once on login, cache it, and update the cache when anything changes. I think the best approach here is to do what we do with ebook_api sessions: store the user info in memcached, and have a few basic Perl API calls for retrieving or updating it. The JS layer can use the Perl API calls as needed. We can also use the cache when rendering TPAC pages, particularly the e-book transaction totals in the dashboard, which rarely change. When the patron performs a transaction, the JS layer does the transaction via the ebook_api service, updates the user cache accordingly, and updates the current page if needed.