cache the json string in shared preferences