stores json in cache