refactor disk cache