{"action":"created","comment":{"url":"https://api.github.com/repos/c2corg/v6_ui/pulls/comments/73716045","id":73716045,"diff_hunk":"@@ -1,11 +1,13 @@\n import requests\n from pyramid.config import Configurator\n-from pyramid_mako import add_mako_renderer\n-from c2corg_ui.lib.cacheversion import version_cache_buster, CACHE_PATH\n from pyramid.httpexceptions import (\n     HTTPBadRequest, HTTPInternalServerError)\n-from pyramid.view import view_config\n from pyramid.view import notfound_view_config\n+from pyramid.view import view_config\n+from pyramid_mako import add_mako_renderer","path":"c2corg_ui/__init__.py","position":10,"original_position":10,"commit_id":"829f50ec310f84465cd0a6983081a30ae9a9af67","original_commit_id":"21a1b95a979248796841f56b8a55efbda98cf71c","user":{"login":"asaunier","id":1192331,"avatar_url":"https://avatars.githubusercontent.com/u/1192331?v=3","gravatar_id":"","url":"https://api.github.com/users/asaunier","html_url":"https://github.com/asaunier","followers_url":"https://api.github.com/users/asaunier/followers","following_url":"https://api.github.com/users/asaunier/following{/other_user}","gists_url":"https://api.github.com/users/asaunier/gists{/gist_id}","starred_url":"https://api.github.com/users/asaunier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asaunier/subscriptions","organizations_url":"https://api.github.com/users/asaunier/orgs","repos_url":"https://api.github.com/users/asaunier/repos","events_url":"https://api.github.com/users/asaunier/events{/privacy}","received_events_url":"https://api.github.com/users/asaunier/received_events","type":"User","site_admin":false},"body":"Is this still needed?","created_at":"2016-08-05T15:56:36Z","updated_at":"2016-08-05T15:56:36Z","html_url":"https://github.com/c2corg/v6_ui/pull/552#discussion_r73716045","pull_request_url":"https://api.github.com/repos/c2corg/v6_ui/pulls/552","_links":{"self":{"href":"https://api.github.com/repos/c2corg/v6_ui/pulls/comments/73716045"},"html":{"href":"https://github.com/c2corg/v6_ui/pull/552#discussion_r73716045"},"pull_request":{"href":"https://api.github.com/repos/c2corg/v6_ui/pulls/552"}}},"pull_request":{"url":"https://api.github.com/repos/c2corg/v6_ui/pulls/552","id":80205396,"html_url":"https://github.com/c2corg/v6_ui/pull/552","diff_url":"https://github.com/c2corg/v6_ui/pull/552.diff","patch_url":"https://github.com/c2corg/v6_ui/pull/552.patch","issue_url":"https://api.github.com/repos/c2corg/v6_ui/issues/552","number":552,"state":"open","locked":false,"title":"Cache pages","user":{"login":"tsauerwein","id":266474,"avatar_url":"https://avatars.githubusercontent.com/u/266474?v=3","gravatar_id":"","url":"https://api.github.com/users/tsauerwein","html_url":"https://github.com/tsauerwein","followers_url":"https://api.github.com/users/tsauerwein/followers","following_url":"https://api.github.com/users/tsauerwein/following{/other_user}","gists_url":"https://api.github.com/users/tsauerwein/gists{/gist_id}","starred_url":"https://api.github.com/users/tsauerwein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsauerwein/subscriptions","organizations_url":"https://api.github.com/users/tsauerwein/orgs","repos_url":"https://api.github.com/users/tsauerwein/repos","events_url":"https://api.github.com/users/tsauerwein/events{/privacy}","received_events_url":"https://api.github.com/users/tsauerwein/received_events","type":"User","site_admin":false},"body":"This PR enables page caching. For example when requesting a document `routes/12345/fr`, the ui server side will check if there is an entry in the cache. If so, a request to the api is made with the previous ETag value (which is stored with the cached page). If the document on the api side has not changed, the cached page is returned. Otherwise the page is rendered, and the cached entry is updated.\r\nAn ETag is header is set, which is used by the browser cache (and also Varnish). The ETag header consists of the ETag from the api and the current Git revision (+ a timestamp when running the dev server).\r\n\r\nTodo:\r\n* [x] Set up caching/ETag for\r\n  * [x] Detail page\r\n  * [x] Archive page\r\n  * [x] History page\r\n  * [x] Diff page\r\n  * [x] Index page\r\n  * [x] Add/~~edit~~ page\r\n  * [x] Index/auth/account page\r\n\r\nDepends on https://github.com/c2corg/v6_api/pull/336\r\nRelated to https://github.com/c2corg/v6_ui/issues/456","created_at":"2016-08-05T08:15:08Z","updated_at":"2016-08-05T15:56:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4b1614c0d6caa37cc82d0b8fe2cbf88cb95056cf","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/c2corg/v6_ui/pulls/552/commits","review_comments_url":"https://api.github.com/repos/c2corg/v6_ui/pulls/552/comments","review_comment_url":"https://api.github.com/repos/c2corg/v6_ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/c2corg/v6_ui/issues/552/comments","statuses_url":"https://api.github.com/repos/c2corg/v6_ui/statuses/829f50ec310f84465cd0a6983081a30ae9a9af67","head":{"label":"c2corg:cache-api-requests","ref":"cache-api-requests","sha":"829f50ec310f84465cd0a6983081a30ae9a9af67","user":{"login":"c2corg","id":3200587,"avatar_url":"https://avatars.githubusercontent.com/u/3200587?v=3","gravatar_id":"","url":"https://api.github.com/users/c2corg","html_url":"https://github.com/c2corg","followers_url":"https://api.github.com/users/c2corg/followers","following_url":"https://api.github.com/users/c2corg/following{/other_user}","gists_url":"https://api.github.com/users/c2corg/gists{/gist_id}","starred_url":"https://api.github.com/users/c2corg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c2corg/subscriptions","organizations_url":"https://api.github.com/users/c2corg/orgs","repos_url":"https://api.github.com/users/c2corg/repos","events_url":"https://api.github.com/users/c2corg/events{/privacy}","received_events_url":"https://api.github.com/users/c2corg/received_events","type":"Organization","site_admin":false},"repo":{"id":43445823,"name":"v6_ui","full_name":"c2corg/v6_ui","owner":{"login":"c2corg","id":3200587,"avatar_url":"https://avatars.githubusercontent.com/u/3200587?v=3","gravatar_id":"","url":"https://api.github.com/users/c2corg","html_url":"https://github.com/c2corg","followers_url":"https://api.github.com/users/c2corg/followers","following_url":"https://api.github.com/users/c2corg/following{/other_user}","gists_url":"https://api.github.com/users/c2corg/gists{/gist_id}","starred_url":"https://api.github.com/users/c2corg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c2corg/subscriptions","organizations_url":"https://api.github.com/users/c2corg/orgs","repos_url":"https://api.github.com/users/c2corg/repos","events_url":"https://api.github.com/users/c2corg/events{/privacy}","received_events_url":"https://api.github.com/users/c2corg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/c2corg/v6_ui","description":"UI for c2c.org v6","fork":false,"url":"https://api.github.com/repos/c2corg/v6_ui","forks_url":"https://api.github.com/repos/c2corg/v6_ui/forks","keys_url":"https://api.github.com/repos/c2corg/v6_ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/c2corg/v6_ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/c2corg/v6_ui/teams","hooks_url":"https://api.github.com/repos/c2corg/v6_ui/hooks","issue_events_url":"https://api.github.com/repos/c2corg/v6_ui/issues/events{/number}","events_url":"https://api.github.com/repos/c2corg/v6_ui/events","assignees_url":"https://api.github.com/repos/c2corg/v6_ui/assignees{/user}","branches_url":"https://api.github.com/repos/c2corg/v6_ui/branches{/branch}","tags_url":"https://api.github.com/repos/c2corg/v6_ui/tags","blobs_url":"https://api.github.com/repos/c2corg/v6_ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/c2corg/v6_ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/c2corg/v6_ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/c2corg/v6_ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/c2corg/v6_ui/statuses/{sha}","languages_url":"https://api.github.com/repos/c2corg/v6_ui/languages","stargazers_url":"https://api.github.com/repos/c2corg/v6_ui/stargazers","contributors_url":"https://api.github.com/repos/c2corg/v6_ui/contributors","subscribers_url":"https://api.github.com/repos/c2corg/v6_ui/subscribers","subscription_url":"https://api.github.com/repos/c2corg/v6_ui/subscription","commits_url":"https://api.github.com/repos/c2corg/v6_ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/c2corg/v6_ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/c2corg/v6_ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/c2corg/v6_ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/c2corg/v6_ui/contents/{+path}","compare_url":"https://api.github.com/repos/c2corg/v6_ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/c2corg/v6_ui/merges","archive_url":"https://api.github.com/repos/c2corg/v6_ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/c2corg/v6_ui/downloads","issues_url":"https://api.github.com/repos/c2corg/v6_ui/issues{/number}","pulls_url":"https://api.github.com/repos/c2corg/v6_ui/pulls{/number}","milestones_url":"https://api.github.com/repos/c2corg/v6_ui/milestones{/number}","notifications_url":"https://api.github.com/repos/c2corg/v6_ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/c2corg/v6_ui/labels{/name}","releases_url":"https://api.github.com/repos/c2corg/v6_ui/releases{/id}","deployments_url":"https://api.github.com/repos/c2corg/v6_ui/deployments","created_at":"2015-09-30T16:52:44Z","updated_at":"2016-04-12T09:20:57Z","pushed_at":"2016-08-05T13:39:09Z","git_url":"git://github.com/c2corg/v6_ui.git","ssh_url":"git@github.com:c2corg/v6_ui.git","clone_url":"https://github.com/c2corg/v6_ui.git","svn_url":"https://github.com/c2corg/v6_ui","homepage":null,"size":2329,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":98,"forks":2,"open_issues":98,"watchers":2,"default_branch":"master"}},"base":{"label":"c2corg:master","ref":"master","sha":"cab4325de6ee09b06d0e84852b7644f4ebc57751","user":{"login":"c2corg","id":3200587,"avatar_url":"https://avatars.githubusercontent.com/u/3200587?v=3","gravatar_id":"","url":"https://api.github.com/users/c2corg","html_url":"https://github.com/c2corg","followers_url":"https://api.github.com/users/c2corg/followers","following_url":"https://api.github.com/users/c2corg/following{/other_user}","gists_url":"https://api.github.com/users/c2corg/gists{/gist_id}","starred_url":"https://api.github.com/users/c2corg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c2corg/subscriptions","organizations_url":"https://api.github.com/users/c2corg/orgs","repos_url":"https://api.github.com/users/c2corg/repos","events_url":"https://api.github.com/users/c2corg/events{/privacy}","received_events_url":"https://api.github.com/users/c2corg/received_events","type":"Organization","site_admin":false},"repo":{"id":43445823,"name":"v6_ui","full_name":"c2corg/v6_ui","owner":{"login":"c2corg","id":3200587,"avatar_url":"https://avatars.githubusercontent.com/u/3200587?v=3","gravatar_id":"","url":"https://api.github.com/users/c2corg","html_url":"https://github.com/c2corg","followers_url":"https://api.github.com/users/c2corg/followers","following_url":"https://api.github.com/users/c2corg/following{/other_user}","gists_url":"https://api.github.com/users/c2corg/gists{/gist_id}","starred_url":"https://api.github.com/users/c2corg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c2corg/subscriptions","organizations_url":"https://api.github.com/users/c2corg/orgs","repos_url":"https://api.github.com/users/c2corg/repos","events_url":"https://api.github.com/users/c2corg/events{/privacy}","received_events_url":"https://api.github.com/users/c2corg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/c2corg/v6_ui","description":"UI for c2c.org v6","fork":false,"url":"https://api.github.com/repos/c2corg/v6_ui","forks_url":"https://api.github.com/repos/c2corg/v6_ui/forks","keys_url":"https://api.github.com/repos/c2corg/v6_ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/c2corg/v6_ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/c2corg/v6_ui/teams","hooks_url":"https://api.github.com/repos/c2corg/v6_ui/hooks","issue_events_url":"https://api.github.com/repos/c2corg/v6_ui/issues/events{/number}","events_url":"https://api.github.com/repos/c2corg/v6_ui/events","assignees_url":"https://api.github.com/repos/c2corg/v6_ui/assignees{/user}","branches_url":"https://api.github.com/repos/c2corg/v6_ui/branches{/branch}","tags_url":"https://api.github.com/repos/c2corg/v6_ui/tags","blobs_url":"https://api.github.com/repos/c2corg/v6_ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/c2corg/v6_ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/c2corg/v6_ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/c2corg/v6_ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/c2corg/v6_ui/statuses/{sha}","languages_url":"https://api.github.com/repos/c2corg/v6_ui/languages","stargazers_url":"https://api.github.com/repos/c2corg/v6_ui/stargazers","contributors_url":"https://api.github.com/repos/c2corg/v6_ui/contributors","subscribers_url":"https://api.github.com/repos/c2corg/v6_ui/subscribers","subscription_url":"https://api.github.com/repos/c2corg/v6_ui/subscription","commits_url":"https://api.github.com/repos/c2corg/v6_ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/c2corg/v6_ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/c2corg/v6_ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/c2corg/v6_ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/c2corg/v6_ui/contents/{+path}","compare_url":"https://api.github.com/repos/c2corg/v6_ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/c2corg/v6_ui/merges","archive_url":"https://api.github.com/repos/c2corg/v6_ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/c2corg/v6_ui/downloads","issues_url":"https://api.github.com/repos/c2corg/v6_ui/issues{/number}","pulls_url":"https://api.github.com/repos/c2corg/v6_ui/pulls{/number}","milestones_url":"https://api.github.com/repos/c2corg/v6_ui/milestones{/number}","notifications_url":"https://api.github.com/repos/c2corg/v6_ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/c2corg/v6_ui/labels{/name}","releases_url":"https://api.github.com/repos/c2corg/v6_ui/releases{/id}","deployments_url":"https://api.github.com/repos/c2corg/v6_ui/deployments","created_at":"2015-09-30T16:52:44Z","updated_at":"2016-04-12T09:20:57Z","pushed_at":"2016-08-05T13:39:09Z","git_url":"git://github.com/c2corg/v6_ui.git","ssh_url":"git@github.com:c2corg/v6_ui.git","clone_url":"https://github.com/c2corg/v6_ui.git","svn_url":"https://github.com/c2corg/v6_ui","homepage":null,"size":2329,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":98,"forks":2,"open_issues":98,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/c2corg/v6_ui/pulls/552"},"html":{"href":"https://github.com/c2corg/v6_ui/pull/552"},"issue":{"href":"https://api.github.com/repos/c2corg/v6_ui/issues/552"},"comments":{"href":"https://api.github.com/repos/c2corg/v6_ui/issues/552/comments"},"review_comments":{"href":"https://api.github.com/repos/c2corg/v6_ui/pulls/552/comments"},"review_comment":{"href":"https://api.github.com/repos/c2corg/v6_ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/c2corg/v6_ui/pulls/552/commits"},"statuses":{"href":"https://api.github.com/repos/c2corg/v6_ui/statuses/829f50ec310f84465cd0a6983081a30ae9a9af67"}}}}
{"actor":{"display_login":"asaunier"}}