{"action":"created","issue":{"url":"https://api.github.com/repos/guardian/frontend/issues/13669","repository_url":"https://api.github.com/repos/guardian/frontend","labels_url":"https://api.github.com/repos/guardian/frontend/issues/13669/labels{/name}","comments_url":"https://api.github.com/repos/guardian/frontend/issues/13669/comments","events_url":"https://api.github.com/repos/guardian/frontend/issues/13669/events","html_url":"https://github.com/guardian/frontend/pull/13669","id":166544787,"number":13669,"title":"Cache auto update endpoints for liveblogs","user":{"login":"johnduffell","id":7304387,"avatar_url":"https://avatars.githubusercontent.com/u/7304387?v=3","gravatar_id":"","url":"https://api.github.com/users/johnduffell","html_url":"https://github.com/johnduffell","followers_url":"https://api.github.com/users/johnduffell/followers","following_url":"https://api.github.com/users/johnduffell/following{/other_user}","gists_url":"https://api.github.com/users/johnduffell/gists{/gist_id}","starred_url":"https://api.github.com/users/johnduffell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnduffell/subscriptions","organizations_url":"https://api.github.com/users/johnduffell/orgs","repos_url":"https://api.github.com/users/johnduffell/repos","events_url":"https://api.github.com/users/johnduffell/events{/privacy}","received_events_url":"https://api.github.com/users/johnduffell/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-07-20T10:03:04Z","updated_at":"2016-07-27T09:44:43Z","closed_at":"2016-07-25T15:13:28Z","pull_request":{"url":"https://api.github.com/repos/guardian/frontend/pulls/13669","html_url":"https://github.com/guardian/frontend/pull/13669","diff_url":"https://github.com/guardian/frontend/pull/13669.diff","patch_url":"https://github.com/guardian/frontend/pull/13669.patch"},"body":"For liveblog updates currently we can ask for all blocks since block-nnnnn.  Since there are many blocks in a liveblog, that is many unique requests.\r\n\r\nPreviously all those were kept up to date by caching only 5 seconds.  This will cache all but the latest one for a longer time (1 hour) and the latest one only will be cached for 5 seconds.\r\n\r\nThis has the side effect of making browsers have to fetch multiple times to get all the updates, although with a 10 second cycle time it's unlikely to be a problem.  However the update frequency increases when you switch away from the tab, so I have made it short cycle on the client side if there's an update when we go back to the browser from an other tab.\r\n\r\nOverall we should save money!\r\n\r\n@TBonnin take a look"},"comment":{"url":"https://api.github.com/repos/guardian/frontend/issues/comments/235538432","html_url":"https://github.com/guardian/frontend/pull/13669#issuecomment-235538432","issue_url":"https://api.github.com/repos/guardian/frontend/issues/13669","id":235538432,"user":{"login":"johnduffell","id":7304387,"avatar_url":"https://avatars.githubusercontent.com/u/7304387?v=3","gravatar_id":"","url":"https://api.github.com/users/johnduffell","html_url":"https://github.com/johnduffell","followers_url":"https://api.github.com/users/johnduffell/followers","following_url":"https://api.github.com/users/johnduffell/following{/other_user}","gists_url":"https://api.github.com/users/johnduffell/gists{/gist_id}","starred_url":"https://api.github.com/users/johnduffell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnduffell/subscriptions","organizations_url":"https://api.github.com/users/johnduffell/orgs","repos_url":"https://api.github.com/users/johnduffell/repos","events_url":"https://api.github.com/users/johnduffell/events{/privacy}","received_events_url":"https://api.github.com/users/johnduffell/received_events","type":"User","site_admin":false},"created_at":"2016-07-27T09:44:43Z","updated_at":"2016-07-27T09:44:43Z","body":"The last week graph by hour of number of 304 Not Modified responses per hour (i.e. unnecessary GETs) for the \"get updates\" endpoint.  I switched the lastest bit on between the 25 and the 13 of `2016-07-25 13:00`\r\n![image](https://cloud.githubusercontent.com/assets/7304387/17170931/42f566d0-53e6-11e6-860a-11178efe4bee.png)\r\n"}}
{"actor":{"display_login":"johnduffell"}}