Optimize borrowing of books by caching spreadsheet query