Better cache cleanup