Implemented caching with rewrite 2 snapshot