Fix bug with empty cache during transaction update and delete