Fix caching so that we cache JSON