Removing the unnecessary changes in the cache