use cache when redraw