Revert "Revert "add cache""

This reverts commit b358d6ef2d4f22c9dbcf77a901da0ff3c566ca26.