changed cache code