Updated caching to respond with gzipped if done