Adding cache support back after refactor.