{"action":"created","comment":{"url":"https://api.github.com/repos/continuationlabs/tacky/pulls/comments/30074747","id":30074747,"diff_hunk":"@@ -0,0 +1,58 @@\n+var Http = require('http');\r\n+\r\n+var Hapi = require('hapi');\r\n+var Hoek = require('hoek');\r\n+\r\n+var Tacky = require('../lib');\r\n+\r\n+var server = new Hapi.Server();\r\n+server.connection({ port: 9001 });\r\n+\r\n+server.register({\r\n+  register: Tacky\r\n+}, function (err) {\r\n+\r\n+  server.route({\r\n+    method: 'get',\r\n+    path: '/',\r\n+    config: {\r\n+      handler: {\r\n+        cache: {\r\n+            hydrate: function (request, callback) {\r\n+              Http.get('http://www.google.com', function (res) {\r\n+                var data = '';\r\n+                res.on('data', function (chunk) {\r\n+                  data += chunk;\r\n+                });\r\n+                res.on('end', function () {\r","path":"examples/state.js","position":27,"original_position":27,"commit_id":"8ebf1faa2fcba3d9f9ccc16d1255a96196d1c5e3","original_commit_id":"8ebf1faa2fcba3d9f9ccc16d1255a96196d1c5e3","user":{"login":"cjihrig","id":2512748,"avatar_url":"https://avatars.githubusercontent.com/u/2512748?v=3","gravatar_id":"","url":"https://api.github.com/users/cjihrig","html_url":"https://github.com/cjihrig","followers_url":"https://api.github.com/users/cjihrig/followers","following_url":"https://api.github.com/users/cjihrig/following{/other_user}","gists_url":"https://api.github.com/users/cjihrig/gists{/gist_id}","starred_url":"https://api.github.com/users/cjihrig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjihrig/subscriptions","organizations_url":"https://api.github.com/users/cjihrig/orgs","repos_url":"https://api.github.com/users/cjihrig/repos","events_url":"https://api.github.com/users/cjihrig/events{/privacy}","received_events_url":"https://api.github.com/users/cjihrig/received_events","type":"User","site_admin":false},"body":"Missing blank line","created_at":"2015-05-11T19:50:19Z","updated_at":"2015-05-11T19:50:19Z","html_url":"https://github.com/continuationlabs/tacky/pull/13#discussion_r30074747","pull_request_url":"https://api.github.com/repos/continuationlabs/tacky/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/continuationlabs/tacky/pulls/comments/30074747"},"html":{"href":"https://github.com/continuationlabs/tacky/pull/13#discussion_r30074747"},"pull_request":{"href":"https://api.github.com/repos/continuationlabs/tacky/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/continuationlabs/tacky/pulls/13","id":35161729,"html_url":"https://github.com/continuationlabs/tacky/pull/13","diff_url":"https://github.com/continuationlabs/tacky/pull/13.diff","patch_url":"https://github.com/continuationlabs/tacky/pull/13.patch","issue_url":"https://api.github.com/repos/continuationlabs/tacky/issues/13","number":13,"state":"open","locked":false,"title":"Store the state value in the cache as well","user":{"login":"arb","id":1591483,"avatar_url":"https://avatars.githubusercontent.com/u/1591483?v=3","gravatar_id":"","url":"https://api.github.com/users/arb","html_url":"https://github.com/arb","followers_url":"https://api.github.com/users/arb/followers","following_url":"https://api.github.com/users/arb/following{/other_user}","gists_url":"https://api.github.com/users/arb/gists{/gist_id}","starred_url":"https://api.github.com/users/arb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arb/subscriptions","organizations_url":"https://api.github.com/users/arb/orgs","repos_url":"https://api.github.com/users/arb/repos","events_url":"https://api.github.com/users/arb/events{/privacy}","received_events_url":"https://api.github.com/users/arb/received_events","type":"User","site_admin":false},"body":"Closes #12 \r\n\r\n`state` would only be available the first time `hydrate` is called which is the opposite of useful, so we are storing that as well in the cache.\r\n\r\nAdded example.","created_at":"2015-05-11T19:43:10Z","updated_at":"2015-05-11T19:50:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"efec349b30aa66dda19477b9fbc1397065268994","assignee":{"login":"cjihrig","id":2512748,"avatar_url":"https://avatars.githubusercontent.com/u/2512748?v=3","gravatar_id":"","url":"https://api.github.com/users/cjihrig","html_url":"https://github.com/cjihrig","followers_url":"https://api.github.com/users/cjihrig/followers","following_url":"https://api.github.com/users/cjihrig/following{/other_user}","gists_url":"https://api.github.com/users/cjihrig/gists{/gist_id}","starred_url":"https://api.github.com/users/cjihrig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjihrig/subscriptions","organizations_url":"https://api.github.com/users/cjihrig/orgs","repos_url":"https://api.github.com/users/cjihrig/repos","events_url":"https://api.github.com/users/cjihrig/events{/privacy}","received_events_url":"https://api.github.com/users/cjihrig/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/continuationlabs/tacky/milestones/1","html_url":"https://github.com/continuationlabs/tacky/milestones/2.0.0","labels_url":"https://api.github.com/repos/continuationlabs/tacky/milestones/1/labels","id":1091390,"number":1,"title":"2.0.0","description":"","creator":{"login":"arb","id":1591483,"avatar_url":"https://avatars.githubusercontent.com/u/1591483?v=3","gravatar_id":"","url":"https://api.github.com/users/arb","html_url":"https://github.com/arb","followers_url":"https://api.github.com/users/arb/followers","following_url":"https://api.github.com/users/arb/following{/other_user}","gists_url":"https://api.github.com/users/arb/gists{/gist_id}","starred_url":"https://api.github.com/users/arb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arb/subscriptions","organizations_url":"https://api.github.com/users/arb/orgs","repos_url":"https://api.github.com/users/arb/repos","events_url":"https://api.github.com/users/arb/events{/privacy}","received_events_url":"https://api.github.com/users/arb/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":8,"state":"open","created_at":"2015-04-30T16:44:37Z","updated_at":"2015-05-11T19:43:10Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/continuationlabs/tacky/pulls/13/commits","review_comments_url":"https://api.github.com/repos/continuationlabs/tacky/pulls/13/comments","review_comment_url":"https://api.github.com/repos/continuationlabs/tacky/pulls/comments{/number}","comments_url":"https://api.github.com/repos/continuationlabs/tacky/issues/13/comments","statuses_url":"https://api.github.com/repos/continuationlabs/tacky/statuses/8ebf1faa2fcba3d9f9ccc16d1255a96196d1c5e3","head":{"label":"arb:state-updates","ref":"state-updates","sha":"8ebf1faa2fcba3d9f9ccc16d1255a96196d1c5e3","user":{"login":"arb","id":1591483,"avatar_url":"https://avatars.githubusercontent.com/u/1591483?v=3","gravatar_id":"","url":"https://api.github.com/users/arb","html_url":"https://github.com/arb","followers_url":"https://api.github.com/users/arb/followers","following_url":"https://api.github.com/users/arb/following{/other_user}","gists_url":"https://api.github.com/users/arb/gists{/gist_id}","starred_url":"https://api.github.com/users/arb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arb/subscriptions","organizations_url":"https://api.github.com/users/arb/orgs","repos_url":"https://api.github.com/users/arb/repos","events_url":"https://api.github.com/users/arb/events{/privacy}","received_events_url":"https://api.github.com/users/arb/received_events","type":"User","site_admin":false},"repo":{"id":35109137,"name":"tacky","full_name":"arb/tacky","owner":{"login":"arb","id":1591483,"avatar_url":"https://avatars.githubusercontent.com/u/1591483?v=3","gravatar_id":"","url":"https://api.github.com/users/arb","html_url":"https://github.com/arb","followers_url":"https://api.github.com/users/arb/followers","following_url":"https://api.github.com/users/arb/following{/other_user}","gists_url":"https://api.github.com/users/arb/gists{/gist_id}","starred_url":"https://api.github.com/users/arb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arb/subscriptions","organizations_url":"https://api.github.com/users/arb/orgs","repos_url":"https://api.github.com/users/arb/repos","events_url":"https://api.github.com/users/arb/events{/privacy}","received_events_url":"https://api.github.com/users/arb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/arb/tacky","description":"Server-side response caching for hapi.","fork":true,"url":"https://api.github.com/repos/arb/tacky","forks_url":"https://api.github.com/repos/arb/tacky/forks","keys_url":"https://api.github.com/repos/arb/tacky/keys{/key_id}","collaborators_url":"https://api.github.com/repos/arb/tacky/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/arb/tacky/teams","hooks_url":"https://api.github.com/repos/arb/tacky/hooks","issue_events_url":"https://api.github.com/repos/arb/tacky/issues/events{/number}","events_url":"https://api.github.com/repos/arb/tacky/events","assignees_url":"https://api.github.com/repos/arb/tacky/assignees{/user}","branches_url":"https://api.github.com/repos/arb/tacky/branches{/branch}","tags_url":"https://api.github.com/repos/arb/tacky/tags","blobs_url":"https://api.github.com/repos/arb/tacky/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/arb/tacky/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/arb/tacky/git/refs{/sha}","trees_url":"https://api.github.com/repos/arb/tacky/git/trees{/sha}","statuses_url":"https://api.github.com/repos/arb/tacky/statuses/{sha}","languages_url":"https://api.github.com/repos/arb/tacky/languages","stargazers_url":"https://api.github.com/repos/arb/tacky/stargazers","contributors_url":"https://api.github.com/repos/arb/tacky/contributors","subscribers_url":"https://api.github.com/repos/arb/tacky/subscribers","subscription_url":"https://api.github.com/repos/arb/tacky/subscription","commits_url":"https://api.github.com/repos/arb/tacky/commits{/sha}","git_commits_url":"https://api.github.com/repos/arb/tacky/git/commits{/sha}","comments_url":"https://api.github.com/repos/arb/tacky/comments{/number}","issue_comment_url":"https://api.github.com/repos/arb/tacky/issues/comments{/number}","contents_url":"https://api.github.com/repos/arb/tacky/contents/{+path}","compare_url":"https://api.github.com/repos/arb/tacky/compare/{base}...{head}","merges_url":"https://api.github.com/repos/arb/tacky/merges","archive_url":"https://api.github.com/repos/arb/tacky/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/arb/tacky/downloads","issues_url":"https://api.github.com/repos/arb/tacky/issues{/number}","pulls_url":"https://api.github.com/repos/arb/tacky/pulls{/number}","milestones_url":"https://api.github.com/repos/arb/tacky/milestones{/number}","notifications_url":"https://api.github.com/repos/arb/tacky/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/arb/tacky/labels{/name}","releases_url":"https://api.github.com/repos/arb/tacky/releases{/id}","created_at":"2015-05-05T15:50:49Z","updated_at":"2015-05-05T15:50:50Z","pushed_at":"2015-05-11T19:42:19Z","git_url":"git://github.com/arb/tacky.git","ssh_url":"git@github.com:arb/tacky.git","clone_url":"https://github.com/arb/tacky.git","svn_url":"https://github.com/arb/tacky","homepage":null,"size":126,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"continuationlabs:master","ref":"master","sha":"6bb49550ca889f8753f94d88c8aaa6ffbc37e4df","user":{"login":"continuationlabs","id":12009519,"avatar_url":"https://avatars.githubusercontent.com/u/12009519?v=3","gravatar_id":"","url":"https://api.github.com/users/continuationlabs","html_url":"https://github.com/continuationlabs","followers_url":"https://api.github.com/users/continuationlabs/followers","following_url":"https://api.github.com/users/continuationlabs/following{/other_user}","gists_url":"https://api.github.com/users/continuationlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/continuationlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/continuationlabs/subscriptions","organizations_url":"https://api.github.com/users/continuationlabs/orgs","repos_url":"https://api.github.com/users/continuationlabs/repos","events_url":"https://api.github.com/users/continuationlabs/events{/privacy}","received_events_url":"https://api.github.com/users/continuationlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":34858540,"name":"tacky","full_name":"continuationlabs/tacky","owner":{"login":"continuationlabs","id":12009519,"avatar_url":"https://avatars.githubusercontent.com/u/12009519?v=3","gravatar_id":"","url":"https://api.github.com/users/continuationlabs","html_url":"https://github.com/continuationlabs","followers_url":"https://api.github.com/users/continuationlabs/followers","following_url":"https://api.github.com/users/continuationlabs/following{/other_user}","gists_url":"https://api.github.com/users/continuationlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/continuationlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/continuationlabs/subscriptions","organizations_url":"https://api.github.com/users/continuationlabs/orgs","repos_url":"https://api.github.com/users/continuationlabs/repos","events_url":"https://api.github.com/users/continuationlabs/events{/privacy}","received_events_url":"https://api.github.com/users/continuationlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/continuationlabs/tacky","description":"Server-side response caching for hapi.","fork":false,"url":"https://api.github.com/repos/continuationlabs/tacky","forks_url":"https://api.github.com/repos/continuationlabs/tacky/forks","keys_url":"https://api.github.com/repos/continuationlabs/tacky/keys{/key_id}","collaborators_url":"https://api.github.com/repos/continuationlabs/tacky/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/continuationlabs/tacky/teams","hooks_url":"https://api.github.com/repos/continuationlabs/tacky/hooks","issue_events_url":"https://api.github.com/repos/continuationlabs/tacky/issues/events{/number}","events_url":"https://api.github.com/repos/continuationlabs/tacky/events","assignees_url":"https://api.github.com/repos/continuationlabs/tacky/assignees{/user}","branches_url":"https://api.github.com/repos/continuationlabs/tacky/branches{/branch}","tags_url":"https://api.github.com/repos/continuationlabs/tacky/tags","blobs_url":"https://api.github.com/repos/continuationlabs/tacky/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/continuationlabs/tacky/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/continuationlabs/tacky/git/refs{/sha}","trees_url":"https://api.github.com/repos/continuationlabs/tacky/git/trees{/sha}","statuses_url":"https://api.github.com/repos/continuationlabs/tacky/statuses/{sha}","languages_url":"https://api.github.com/repos/continuationlabs/tacky/languages","stargazers_url":"https://api.github.com/repos/continuationlabs/tacky/stargazers","contributors_url":"https://api.github.com/repos/continuationlabs/tacky/contributors","subscribers_url":"https://api.github.com/repos/continuationlabs/tacky/subscribers","subscription_url":"https://api.github.com/repos/continuationlabs/tacky/subscription","commits_url":"https://api.github.com/repos/continuationlabs/tacky/commits{/sha}","git_commits_url":"https://api.github.com/repos/continuationlabs/tacky/git/commits{/sha}","comments_url":"https://api.github.com/repos/continuationlabs/tacky/comments{/number}","issue_comment_url":"https://api.github.com/repos/continuationlabs/tacky/issues/comments{/number}","contents_url":"https://api.github.com/repos/continuationlabs/tacky/contents/{+path}","compare_url":"https://api.github.com/repos/continuationlabs/tacky/compare/{base}...{head}","merges_url":"https://api.github.com/repos/continuationlabs/tacky/merges","archive_url":"https://api.github.com/repos/continuationlabs/tacky/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/continuationlabs/tacky/downloads","issues_url":"https://api.github.com/repos/continuationlabs/tacky/issues{/number}","pulls_url":"https://api.github.com/repos/continuationlabs/tacky/pulls{/number}","milestones_url":"https://api.github.com/repos/continuationlabs/tacky/milestones{/number}","notifications_url":"https://api.github.com/repos/continuationlabs/tacky/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/continuationlabs/tacky/labels{/name}","releases_url":"https://api.github.com/repos/continuationlabs/tacky/releases{/id}","created_at":"2015-04-30T14:22:18Z","updated_at":"2015-05-08T16:07:16Z","pushed_at":"2015-05-11T19:43:10Z","git_url":"git://github.com/continuationlabs/tacky.git","ssh_url":"git@github.com:continuationlabs/tacky.git","clone_url":"https://github.com/continuationlabs/tacky.git","svn_url":"https://github.com/continuationlabs/tacky","homepage":null,"size":260,"stargazers_count":8,"watchers_count":8,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/continuationlabs/tacky/pulls/13"},"html":{"href":"https://github.com/continuationlabs/tacky/pull/13"},"issue":{"href":"https://api.github.com/repos/continuationlabs/tacky/issues/13"},"comments":{"href":"https://api.github.com/repos/continuationlabs/tacky/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/continuationlabs/tacky/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/continuationlabs/tacky/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/continuationlabs/tacky/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/continuationlabs/tacky/statuses/8ebf1faa2fcba3d9f9ccc16d1255a96196d1c5e3"}}}}