{"action":"created","comment":{"url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/pulls/comments/69586643","id":69586643,"diff_hunk":"@@ -25,6 +26,7 @@ def generate(self):\n         \"\"\"\n         generate cache\n         \"\"\"\n+        cache_tools.METHOD_CACHE_WRITE_ONLY = True","path":"dashboard/apps/prototype/management/commands/cache.py","position":12,"original_position":12,"commit_id":"fa6a7715b0e5f5321fb581023804206beaf3e02b","original_commit_id":"787ceb5148147a83717cd8483f20986d39acbf57","user":{"login":"cliffxuan","id":640204,"avatar_url":"https://avatars.githubusercontent.com/u/640204?v=3","gravatar_id":"","url":"https://api.github.com/users/cliffxuan","html_url":"https://github.com/cliffxuan","followers_url":"https://api.github.com/users/cliffxuan/followers","following_url":"https://api.github.com/users/cliffxuan/following{/other_user}","gists_url":"https://api.github.com/users/cliffxuan/gists{/gist_id}","starred_url":"https://api.github.com/users/cliffxuan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cliffxuan/subscriptions","organizations_url":"https://api.github.com/users/cliffxuan/orgs","repos_url":"https://api.github.com/users/cliffxuan/repos","events_url":"https://api.github.com/users/cliffxuan/events{/privacy}","received_events_url":"https://api.github.com/users/cliffxuan/received_events","type":"User","site_admin":false},"body":"a 3rd solution is to split the celery specific settings from `base.py` and put it into its own module, where we can just set `METHOD_CACHE_WRITE_ONLY = True`. celery will only generate the cache and not consume it.\r\n\r\nanother thing to be aware is that the impact of `METHOD_CACHE_WRITE_ONLY` only affects `method_cache` decorator, and doesn't affect anything else, e.g. `page_cache`.","created_at":"2016-07-05T15:43:31Z","updated_at":"2016-07-05T15:43:31Z","html_url":"https://github.com/ministryofjustice/moj-product-dashboard/pull/69#discussion_r69586643","pull_request_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/pulls/69","_links":{"self":{"href":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/pulls/comments/69586643"},"html":{"href":"https://github.com/ministryofjustice/moj-product-dashboard/pull/69#discussion_r69586643"},"pull_request":{"href":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/pulls/69"}}},"pull_request":{"url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/pulls/69","id":76284369,"html_url":"https://github.com/ministryofjustice/moj-product-dashboard/pull/69","diff_url":"https://github.com/ministryofjustice/moj-product-dashboard/pull/69.diff","patch_url":"https://github.com/ministryofjustice/moj-product-dashboard/pull/69.patch","issue_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/issues/69","number":69,"state":"open","locked":false,"title":"Feature/cache invalidation control","user":{"login":"cliffxuan","id":640204,"avatar_url":"https://avatars.githubusercontent.com/u/640204?v=3","gravatar_id":"","url":"https://api.github.com/users/cliffxuan","html_url":"https://github.com/cliffxuan","followers_url":"https://api.github.com/users/cliffxuan/followers","following_url":"https://api.github.com/users/cliffxuan/following{/other_user}","gists_url":"https://api.github.com/users/cliffxuan/gists{/gist_id}","starred_url":"https://api.github.com/users/cliffxuan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cliffxuan/subscriptions","organizations_url":"https://api.github.com/users/cliffxuan/orgs","repos_url":"https://api.github.com/users/cliffxuan/repos","events_url":"https://api.github.com/users/cliffxuan/events{/privacy}","received_events_url":"https://api.github.com/users/cliffxuan/received_events","type":"User","site_admin":false},"body":"`manage.py cache gen` command should now invalidate old cache while generating new ones.","created_at":"2016-07-05T14:31:42Z","updated_at":"2016-07-05T15:43:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"77f3b5e2c36ce7b1c5b07748ff4507d35029d25a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/pulls/69/commits","review_comments_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/pulls/69/comments","review_comment_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/issues/69/comments","statuses_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/statuses/fa6a7715b0e5f5321fb581023804206beaf3e02b","head":{"label":"ministryofjustice:feature/cache-invalidation-control","ref":"feature/cache-invalidation-control","sha":"fa6a7715b0e5f5321fb581023804206beaf3e02b","user":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"repo":{"id":58050809,"name":"moj-product-dashboard","full_name":"ministryofjustice/moj-product-dashboard","owner":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ministryofjustice/moj-product-dashboard","description":"Product dashboard for MoJ products","fork":false,"url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard","forks_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/forks","keys_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/teams","hooks_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/hooks","issue_events_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/issues/events{/number}","events_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/events","assignees_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/assignees{/user}","branches_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/branches{/branch}","tags_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/tags","blobs_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/git/refs{/sha}","trees_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/statuses/{sha}","languages_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/languages","stargazers_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/stargazers","contributors_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/contributors","subscribers_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/subscribers","subscription_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/subscription","commits_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/commits{/sha}","git_commits_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/git/commits{/sha}","comments_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/comments{/number}","issue_comment_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/issues/comments{/number}","contents_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/contents/{+path}","compare_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/merges","archive_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/downloads","issues_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/issues{/number}","pulls_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/pulls{/number}","milestones_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/milestones{/number}","notifications_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/labels{/name}","releases_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/releases{/id}","deployments_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/deployments","created_at":"2016-05-04T12:38:01Z","updated_at":"2016-06-01T16:41:02Z","pushed_at":"2016-07-05T15:16:02Z","git_url":"git://github.com/ministryofjustice/moj-product-dashboard.git","ssh_url":"git@github.com:ministryofjustice/moj-product-dashboard.git","clone_url":"https://github.com/ministryofjustice/moj-product-dashboard.git","svn_url":"https://github.com/ministryofjustice/moj-product-dashboard","homepage":null,"size":3001,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"develop"}},"base":{"label":"ministryofjustice:develop","ref":"develop","sha":"61cbfffb411d079a35cdcc80ac1be8fdaff6ab4a","user":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"repo":{"id":58050809,"name":"moj-product-dashboard","full_name":"ministryofjustice/moj-product-dashboard","owner":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ministryofjustice/moj-product-dashboard","description":"Product dashboard for MoJ products","fork":false,"url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard","forks_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/forks","keys_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/teams","hooks_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/hooks","issue_events_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/issues/events{/number}","events_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/events","assignees_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/assignees{/user}","branches_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/branches{/branch}","tags_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/tags","blobs_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/git/refs{/sha}","trees_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/statuses/{sha}","languages_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/languages","stargazers_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/stargazers","contributors_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/contributors","subscribers_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/subscribers","subscription_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/subscription","commits_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/commits{/sha}","git_commits_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/git/commits{/sha}","comments_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/comments{/number}","issue_comment_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/issues/comments{/number}","contents_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/contents/{+path}","compare_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/merges","archive_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/downloads","issues_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/issues{/number}","pulls_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/pulls{/number}","milestones_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/milestones{/number}","notifications_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/labels{/name}","releases_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/releases{/id}","deployments_url":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/deployments","created_at":"2016-05-04T12:38:01Z","updated_at":"2016-06-01T16:41:02Z","pushed_at":"2016-07-05T15:16:02Z","git_url":"git://github.com/ministryofjustice/moj-product-dashboard.git","ssh_url":"git@github.com:ministryofjustice/moj-product-dashboard.git","clone_url":"https://github.com/ministryofjustice/moj-product-dashboard.git","svn_url":"https://github.com/ministryofjustice/moj-product-dashboard","homepage":null,"size":3001,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/pulls/69"},"html":{"href":"https://github.com/ministryofjustice/moj-product-dashboard/pull/69"},"issue":{"href":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/issues/69"},"comments":{"href":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/issues/69/comments"},"review_comments":{"href":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/pulls/69/comments"},"review_comment":{"href":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/pulls/69/commits"},"statuses":{"href":"https://api.github.com/repos/ministryofjustice/moj-product-dashboard/statuses/fa6a7715b0e5f5321fb581023804206beaf3e02b"}}}}
{"actor":{"display_login":"cliffxuan"}}