handling cache