Fixed cache queue logic.