MDL-27120: Cache DB operations in restore_dbops