Dont rewrite content identical to cached data

Optimization to not rewrite content identical to cached data when LRU is enabled