Refactor chained cache