move cache insert when iterating to the iteration client thread