Changed: Added Etag checking to cache routines and removed all the duplicate code.