update cache immediately after refactoring