{"action":"created","issue":{"url":"https://api.github.com/repos/chadrien/hots-irc-bot/issues/30","labels_url":"https://api.github.com/repos/chadrien/hots-irc-bot/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/chadrien/hots-irc-bot/issues/30/comments","events_url":"https://api.github.com/repos/chadrien/hots-irc-bot/issues/30/events","html_url":"https://github.com/chadrien/hots-irc-bot/issues/30","id":57705813,"number":30,"title":"Cache twitch API results","user":{"login":"chadrien","id":1788218,"avatar_url":"https://avatars.githubusercontent.com/u/1788218?v=3","gravatar_id":"","url":"https://api.github.com/users/chadrien","html_url":"https://github.com/chadrien","followers_url":"https://api.github.com/users/chadrien/followers","following_url":"https://api.github.com/users/chadrien/following{/other_user}","gists_url":"https://api.github.com/users/chadrien/gists{/gist_id}","starred_url":"https://api.github.com/users/chadrien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chadrien/subscriptions","organizations_url":"https://api.github.com/users/chadrien/orgs","repos_url":"https://api.github.com/users/chadrien/repos","events_url":"https://api.github.com/users/chadrien/events{/privacy}","received_events_url":"https://api.github.com/users/chadrien/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chadrien/hots-irc-bot/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-14T20:40:30Z","updated_at":"2015-02-14T20:49:39Z","closed_at":null,"body":"For now there is only 4 streams in DB but the bot takes up to 10 secs to return the list. It is so necessary to put API results in cache.\r\n\r\nTo do so I suggest to run a task every 10 minutes to get streams data in background and put them in cache, and make the `!streams` command use this cache for faster results\r\n\r\nSee http://www.rubydoc.info/github/cinchrb/cinch/Cinch/Plugin/ClassMethods#timer-instance_method"},"comment":{"url":"https://api.github.com/repos/chadrien/hots-irc-bot/issues/comments/74391398","html_url":"https://github.com/chadrien/hots-irc-bot/issues/30#issuecomment-74391398","issue_url":"https://api.github.com/repos/chadrien/hots-irc-bot/issues/30","id":74391398,"user":{"login":"Wobbley","id":675423,"avatar_url":"https://avatars.githubusercontent.com/u/675423?v=3","gravatar_id":"","url":"https://api.github.com/users/Wobbley","html_url":"https://github.com/Wobbley","followers_url":"https://api.github.com/users/Wobbley/followers","following_url":"https://api.github.com/users/Wobbley/following{/other_user}","gists_url":"https://api.github.com/users/Wobbley/gists{/gist_id}","starred_url":"https://api.github.com/users/Wobbley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wobbley/subscriptions","organizations_url":"https://api.github.com/users/Wobbley/orgs","repos_url":"https://api.github.com/users/Wobbley/repos","events_url":"https://api.github.com/users/Wobbley/events{/privacy}","received_events_url":"https://api.github.com/users/Wobbley/received_events","type":"User","site_admin":false},"created_at":"2015-02-14T20:49:39Z","updated_at":"2015-02-14T20:49:39Z","body":"That is some really bad performance for a db call? Does it do some server\nhttp calls as well?\nOn Feb 14, 2015 9:40 PM, \"Hadrien Collongues\" <notifications@github.com>\nwrote:\n\n> For now there is only 4 streams in DB but the bot takes up to 10 secs to\n> return the list. It is so necessary to put API results in cache.\n>\n> To do so I suggest to run a task every 10 minutes to get streams data in\n> background and put them in cache, and make the !streams command use this\n> cache for faster results\n>\n>\n> http://www.rubydoc.info/github/cinchrb/cinch/Cinch/Plugin/ClassMethods#timer-instance_method\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/chadrien/hots-irc-bot/issues/30>.\n>\n"}}