Rewrites invalidation for a better speed & memory performance.