{"action":"closed","issue":{"url":"https://api.github.com/repos/nickoneill/Pantry/issues/13","labels_url":"https://api.github.com/repos/nickoneill/Pantry/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/nickoneill/Pantry/issues/13/comments","events_url":"https://api.github.com/repos/nickoneill/Pantry/issues/13/events","html_url":"https://github.com/nickoneill/Pantry/issues/13","id":120043661,"number":13,"title":"Updating cached objects","user":{"login":"damirstuhec","id":1516338,"avatar_url":"https://avatars.githubusercontent.com/u/1516338?v=3","gravatar_id":"","url":"https://api.github.com/users/damirstuhec","html_url":"https://github.com/damirstuhec","followers_url":"https://api.github.com/users/damirstuhec/followers","following_url":"https://api.github.com/users/damirstuhec/following{/other_user}","gists_url":"https://api.github.com/users/damirstuhec/gists{/gist_id}","starred_url":"https://api.github.com/users/damirstuhec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damirstuhec/subscriptions","organizations_url":"https://api.github.com/users/damirstuhec/orgs","repos_url":"https://api.github.com/users/damirstuhec/repos","events_url":"https://api.github.com/users/damirstuhec/events{/privacy}","received_events_url":"https://api.github.com/users/damirstuhec/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-02T21:50:32Z","updated_at":"2015-12-29T19:00:33Z","closed_at":"2015-12-29T19:00:33Z","body":"I have a question about updating cached objects. Let's say I have an array of custom objects which are cached. Then, I make a network request which returns the same set of objects but with updated properties. What are your ideas for handling those cases?\r\n\r\nAn easy solution would be to just clear the cache and save the new data, but that's not always acceptable.\r\n\r\nOff topic question: I see that you have the `removeCache` function defined on `JSONWarehouse` object but its scope is not public. I'm wondering what is the recommended way to clear the cache? A case for that would be the user logging out.\r\n\r\nThanks and keep up!"}}