'Set the dirty indication for every book in the cache. The vast majority
of the time, the indication will already be set. However, sometimes
exceptions may have prevented a commit, which may remove some dirty
indications from the DB. This call will put them back. Note that there
is no problem with setting a dirty indication for a book that isn\'t in
fact dirty. Just wastes a few cycles.'

def commit_dirty_cache(self):

    with self.dirtied_lock:
        book_ids = list(self.dirtied_cache.keys())
        self.dirtied_cache = {}
        self.dirtied(book_ids)
