Improved cache updating mechanism