{"action":"created","issue":{"url":"https://api.github.com/repos/Growstuff/growstuff/issues/635","labels_url":"https://api.github.com/repos/Growstuff/growstuff/issues/635/labels{/name}","comments_url":"https://api.github.com/repos/Growstuff/growstuff/issues/635/comments","events_url":"https://api.github.com/repos/Growstuff/growstuff/issues/635/events","html_url":"https://github.com/Growstuff/growstuff/pull/635","id":54435079,"number":635,"title":"Fix cache key","user":{"login":"tygriffin","id":4317136,"avatar_url":"https://avatars.githubusercontent.com/u/4317136?v=3","gravatar_id":"","url":"https://api.github.com/users/tygriffin","html_url":"https://github.com/tygriffin","followers_url":"https://api.github.com/users/tygriffin/followers","following_url":"https://api.github.com/users/tygriffin/following{/other_user}","gists_url":"https://api.github.com/users/tygriffin/gists{/gist_id}","starred_url":"https://api.github.com/users/tygriffin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tygriffin/subscriptions","organizations_url":"https://api.github.com/users/tygriffin/orgs","repos_url":"https://api.github.com/users/tygriffin/repos","events_url":"https://api.github.com/users/tygriffin/events{/privacy}","received_events_url":"https://api.github.com/users/tygriffin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-01-15T10:45:39Z","updated_at":"2015-01-15T11:35:09Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Growstuff/growstuff/pulls/635","html_url":"https://github.com/Growstuff/growstuff/pull/635","diff_url":"https://github.com/Growstuff/growstuff/pull/635.diff","patch_url":"https://github.com/Growstuff/growstuff/pull/635.patch"},"body":"In response to [this bug](http://talk.growstuff.org/t/please-test-rails-4/173/28).\r\n\r\nIt seems the issue is that the `cache_key_for` method (defined in ApplicationHelper) always returns the same key if the same class is passed into it, so I've added an additional argument which can be included in the key to make it uniquely identifying. As it stands the key is generated by looking at the model name, the total count of records for that model and the time of the most recently updated record. If any of those change, the key is refreshed.\r\n\r\nI turned caching on in development and this fix appears to work.\r\n\r\nI might suggest making a separate story to rip out all this caching stuff and then rebuild it based on New Relic stats."},"comment":{"url":"https://api.github.com/repos/Growstuff/growstuff/issues/comments/70073547","html_url":"https://github.com/Growstuff/growstuff/pull/635#issuecomment-70073547","issue_url":"https://api.github.com/repos/Growstuff/growstuff/issues/635","id":70073547,"user":{"login":"pozorvlak","id":225991,"avatar_url":"https://avatars.githubusercontent.com/u/225991?v=3","gravatar_id":"","url":"https://api.github.com/users/pozorvlak","html_url":"https://github.com/pozorvlak","followers_url":"https://api.github.com/users/pozorvlak/followers","following_url":"https://api.github.com/users/pozorvlak/following{/other_user}","gists_url":"https://api.github.com/users/pozorvlak/gists{/gist_id}","starred_url":"https://api.github.com/users/pozorvlak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pozorvlak/subscriptions","organizations_url":"https://api.github.com/users/pozorvlak/orgs","repos_url":"https://api.github.com/users/pozorvlak/repos","events_url":"https://api.github.com/users/pozorvlak/events{/privacy}","received_events_url":"https://api.github.com/users/pozorvlak/received_events","type":"User","site_admin":false},"created_at":"2015-01-15T11:35:09Z","updated_at":"2015-01-15T11:35:09Z","body":"Cool, though we should submit a bug report to PhantomJS as they request: can you handle that?"}}