Added logic to solve JSON caching