Adding changes for caching
Recache function to replace current cache