completed cache code