{"action":"created","comment":{"url":"https://api.github.com/repos/playframework/playframework/pulls/comments/62116636","id":62116636,"diff_hunk":"@@ -40,31 +43,41 @@ public void inject() {\n \n     @Test\n     public void simple() {\n-        CacheApi cache = app.injector().instanceOf(CacheApi.class);\n+        AsyncCacheApi cache = app.injector().instanceOf(AsyncCacheApi.class);\n \n         News frontPageNews = new News();\n+        {\n         //#simple-set\n-        cache.set(\"item.key\", frontPageNews);\n+        CompletionStage<Void> result = cache.set(\"item.key\", frontPageNews);","path":"documentation/manual/working/javaGuide/main/cache/code/javaguide/cache/JavaCache.java","position":32,"original_position":32,"commit_id":"d53d907f493abc1d0333499755ce3515293834d5","original_commit_id":"d53d907f493abc1d0333499755ce3515293834d5","user":{"login":"julienrf","id":332812,"avatar_url":"https://avatars.githubusercontent.com/u/332812?v=3","gravatar_id":"","url":"https://api.github.com/users/julienrf","html_url":"https://github.com/julienrf","followers_url":"https://api.github.com/users/julienrf/followers","following_url":"https://api.github.com/users/julienrf/following{/other_user}","gists_url":"https://api.github.com/users/julienrf/gists{/gist_id}","starred_url":"https://api.github.com/users/julienrf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julienrf/subscriptions","organizations_url":"https://api.github.com/users/julienrf/orgs","repos_url":"https://api.github.com/users/julienrf/repos","events_url":"https://api.github.com/users/julienrf/events{/privacy}","received_events_url":"https://api.github.com/users/julienrf/received_events","type":"User","site_admin":false},"body":"`Void` (with a capitalized `V`) causes serious issues in Java, I think it’s preferable to switch to `Done`, as suggested by @hepin1989 ","created_at":"2016-05-04T21:17:53Z","updated_at":"2016-05-04T21:17:53Z","html_url":"https://github.com/playframework/playframework/pull/5923#discussion_r62116636","pull_request_url":"https://api.github.com/repos/playframework/playframework/pulls/5923","_links":{"self":{"href":"https://api.github.com/repos/playframework/playframework/pulls/comments/62116636"},"html":{"href":"https://github.com/playframework/playframework/pull/5923#discussion_r62116636"},"pull_request":{"href":"https://api.github.com/repos/playframework/playframework/pulls/5923"}}},"pull_request":{"url":"https://api.github.com/repos/playframework/playframework/pulls/5923","id":63524842,"html_url":"https://github.com/playframework/playframework/pull/5923","diff_url":"https://github.com/playframework/playframework/pull/5923.diff","patch_url":"https://github.com/playframework/playframework/pull/5923.patch","issue_url":"https://api.github.com/repos/playframework/playframework/issues/5923","number":5923,"state":"open","locked":false,"title":"Make CacheApi use futures","user":{"login":"gmethvin","id":171663,"avatar_url":"https://avatars.githubusercontent.com/u/171663?v=3","gravatar_id":"","url":"https://api.github.com/users/gmethvin","html_url":"https://github.com/gmethvin","followers_url":"https://api.github.com/users/gmethvin/followers","following_url":"https://api.github.com/users/gmethvin/following{/other_user}","gists_url":"https://api.github.com/users/gmethvin/gists{/gist_id}","starred_url":"https://api.github.com/users/gmethvin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmethvin/subscriptions","organizations_url":"https://api.github.com/users/gmethvin/orgs","repos_url":"https://api.github.com/users/gmethvin/repos","events_url":"https://api.github.com/users/gmethvin/events{/privacy}","received_events_url":"https://api.github.com/users/gmethvin/received_events","type":"User","site_admin":false},"body":"Rewrite the `CacheApi` to use `Future`/`CompletionStage` where appropriate.\r\n\r\nSince making blocking calls can sometimes be more convenient when using a fast in-memory cache, I've also created a `BlockingCacheApi` that can be accessed either by injecting it directly or calling `cache.sync` on an existing `CacheApi`. This should also make migration straightforward for existing users.","created_at":"2016-03-21T06:10:25Z","updated_at":"2016-05-04T21:17:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2682c8d72ef4608ea166ff7c670eb7e564e63fd7","assignee":null,"milestone":{"url":"https://api.github.com/repos/playframework/playframework/milestones/37","html_url":"https://github.com/playframework/playframework/milestones/2.6.0","labels_url":"https://api.github.com/repos/playframework/playframework/milestones/37/labels","id":1638325,"number":37,"title":"2.6.0","description":null,"creator":{"login":"gmethvin","id":171663,"avatar_url":"https://avatars.githubusercontent.com/u/171663?v=3","gravatar_id":"","url":"https://api.github.com/users/gmethvin","html_url":"https://github.com/gmethvin","followers_url":"https://api.github.com/users/gmethvin/followers","following_url":"https://api.github.com/users/gmethvin/following{/other_user}","gists_url":"https://api.github.com/users/gmethvin/gists{/gist_id}","starred_url":"https://api.github.com/users/gmethvin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmethvin/subscriptions","organizations_url":"https://api.github.com/users/gmethvin/orgs","repos_url":"https://api.github.com/users/gmethvin/repos","events_url":"https://api.github.com/users/gmethvin/events{/privacy}","received_events_url":"https://api.github.com/users/gmethvin/received_events","type":"User","site_admin":false},"open_issues":15,"closed_issues":1,"state":"open","created_at":"2016-03-11T04:54:33Z","updated_at":"2016-05-01T22:46:20Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/playframework/playframework/pulls/5923/commits","review_comments_url":"https://api.github.com/repos/playframework/playframework/pulls/5923/comments","review_comment_url":"https://api.github.com/repos/playframework/playframework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/playframework/playframework/issues/5923/comments","statuses_url":"https://api.github.com/repos/playframework/playframework/statuses/d53d907f493abc1d0333499755ce3515293834d5","head":{"label":"gmethvin:cache","ref":"cache","sha":"d53d907f493abc1d0333499755ce3515293834d5","user":{"login":"gmethvin","id":171663,"avatar_url":"https://avatars.githubusercontent.com/u/171663?v=3","gravatar_id":"","url":"https://api.github.com/users/gmethvin","html_url":"https://github.com/gmethvin","followers_url":"https://api.github.com/users/gmethvin/followers","following_url":"https://api.github.com/users/gmethvin/following{/other_user}","gists_url":"https://api.github.com/users/gmethvin/gists{/gist_id}","starred_url":"https://api.github.com/users/gmethvin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmethvin/subscriptions","organizations_url":"https://api.github.com/users/gmethvin/orgs","repos_url":"https://api.github.com/users/gmethvin/repos","events_url":"https://api.github.com/users/gmethvin/events{/privacy}","received_events_url":"https://api.github.com/users/gmethvin/received_events","type":"User","site_admin":false},"repo":{"id":10559361,"name":"playframework","full_name":"gmethvin/playframework","owner":{"login":"gmethvin","id":171663,"avatar_url":"https://avatars.githubusercontent.com/u/171663?v=3","gravatar_id":"","url":"https://api.github.com/users/gmethvin","html_url":"https://github.com/gmethvin","followers_url":"https://api.github.com/users/gmethvin/followers","following_url":"https://api.github.com/users/gmethvin/following{/other_user}","gists_url":"https://api.github.com/users/gmethvin/gists{/gist_id}","starred_url":"https://api.github.com/users/gmethvin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmethvin/subscriptions","organizations_url":"https://api.github.com/users/gmethvin/orgs","repos_url":"https://api.github.com/users/gmethvin/repos","events_url":"https://api.github.com/users/gmethvin/events{/privacy}","received_events_url":"https://api.github.com/users/gmethvin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gmethvin/playframework","description":"Play framework 2.x","fork":true,"url":"https://api.github.com/repos/gmethvin/playframework","forks_url":"https://api.github.com/repos/gmethvin/playframework/forks","keys_url":"https://api.github.com/repos/gmethvin/playframework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gmethvin/playframework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gmethvin/playframework/teams","hooks_url":"https://api.github.com/repos/gmethvin/playframework/hooks","issue_events_url":"https://api.github.com/repos/gmethvin/playframework/issues/events{/number}","events_url":"https://api.github.com/repos/gmethvin/playframework/events","assignees_url":"https://api.github.com/repos/gmethvin/playframework/assignees{/user}","branches_url":"https://api.github.com/repos/gmethvin/playframework/branches{/branch}","tags_url":"https://api.github.com/repos/gmethvin/playframework/tags","blobs_url":"https://api.github.com/repos/gmethvin/playframework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gmethvin/playframework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gmethvin/playframework/git/refs{/sha}","trees_url":"https://api.github.com/repos/gmethvin/playframework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gmethvin/playframework/statuses/{sha}","languages_url":"https://api.github.com/repos/gmethvin/playframework/languages","stargazers_url":"https://api.github.com/repos/gmethvin/playframework/stargazers","contributors_url":"https://api.github.com/repos/gmethvin/playframework/contributors","subscribers_url":"https://api.github.com/repos/gmethvin/playframework/subscribers","subscription_url":"https://api.github.com/repos/gmethvin/playframework/subscription","commits_url":"https://api.github.com/repos/gmethvin/playframework/commits{/sha}","git_commits_url":"https://api.github.com/repos/gmethvin/playframework/git/commits{/sha}","comments_url":"https://api.github.com/repos/gmethvin/playframework/comments{/number}","issue_comment_url":"https://api.github.com/repos/gmethvin/playframework/issues/comments{/number}","contents_url":"https://api.github.com/repos/gmethvin/playframework/contents/{+path}","compare_url":"https://api.github.com/repos/gmethvin/playframework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gmethvin/playframework/merges","archive_url":"https://api.github.com/repos/gmethvin/playframework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gmethvin/playframework/downloads","issues_url":"https://api.github.com/repos/gmethvin/playframework/issues{/number}","pulls_url":"https://api.github.com/repos/gmethvin/playframework/pulls{/number}","milestones_url":"https://api.github.com/repos/gmethvin/playframework/milestones{/number}","notifications_url":"https://api.github.com/repos/gmethvin/playframework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gmethvin/playframework/labels{/name}","releases_url":"https://api.github.com/repos/gmethvin/playframework/releases{/id}","deployments_url":"https://api.github.com/repos/gmethvin/playframework/deployments","created_at":"2013-06-07T21:37:27Z","updated_at":"2014-07-24T15:49:25Z","pushed_at":"2016-05-02T08:30:25Z","git_url":"git://github.com/gmethvin/playframework.git","ssh_url":"git@github.com:gmethvin/playframework.git","clone_url":"https://github.com/gmethvin/playframework.git","svn_url":"https://github.com/gmethvin/playframework","homepage":"http://www.playframework.org/","size":82337,"stargazers_count":0,"watchers_count":0,"language":"Scala","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":"playframework:master","ref":"master","sha":"a5decc4ec81d311a769208ce007771a1e45b570b","user":{"login":"playframework","id":319107,"avatar_url":"https://avatars.githubusercontent.com/u/319107?v=3","gravatar_id":"","url":"https://api.github.com/users/playframework","html_url":"https://github.com/playframework","followers_url":"https://api.github.com/users/playframework/followers","following_url":"https://api.github.com/users/playframework/following{/other_user}","gists_url":"https://api.github.com/users/playframework/gists{/gist_id}","starred_url":"https://api.github.com/users/playframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/playframework/subscriptions","organizations_url":"https://api.github.com/users/playframework/orgs","repos_url":"https://api.github.com/users/playframework/repos","events_url":"https://api.github.com/users/playframework/events{/privacy}","received_events_url":"https://api.github.com/users/playframework/received_events","type":"Organization","site_admin":false},"repo":{"id":2340549,"name":"playframework","full_name":"playframework/playframework","owner":{"login":"playframework","id":319107,"avatar_url":"https://avatars.githubusercontent.com/u/319107?v=3","gravatar_id":"","url":"https://api.github.com/users/playframework","html_url":"https://github.com/playframework","followers_url":"https://api.github.com/users/playframework/followers","following_url":"https://api.github.com/users/playframework/following{/other_user}","gists_url":"https://api.github.com/users/playframework/gists{/gist_id}","starred_url":"https://api.github.com/users/playframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/playframework/subscriptions","organizations_url":"https://api.github.com/users/playframework/orgs","repos_url":"https://api.github.com/users/playframework/repos","events_url":"https://api.github.com/users/playframework/events{/privacy}","received_events_url":"https://api.github.com/users/playframework/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/playframework/playframework","description":"Play Framework","fork":false,"url":"https://api.github.com/repos/playframework/playframework","forks_url":"https://api.github.com/repos/playframework/playframework/forks","keys_url":"https://api.github.com/repos/playframework/playframework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/playframework/playframework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/playframework/playframework/teams","hooks_url":"https://api.github.com/repos/playframework/playframework/hooks","issue_events_url":"https://api.github.com/repos/playframework/playframework/issues/events{/number}","events_url":"https://api.github.com/repos/playframework/playframework/events","assignees_url":"https://api.github.com/repos/playframework/playframework/assignees{/user}","branches_url":"https://api.github.com/repos/playframework/playframework/branches{/branch}","tags_url":"https://api.github.com/repos/playframework/playframework/tags","blobs_url":"https://api.github.com/repos/playframework/playframework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/playframework/playframework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/playframework/playframework/git/refs{/sha}","trees_url":"https://api.github.com/repos/playframework/playframework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/playframework/playframework/statuses/{sha}","languages_url":"https://api.github.com/repos/playframework/playframework/languages","stargazers_url":"https://api.github.com/repos/playframework/playframework/stargazers","contributors_url":"https://api.github.com/repos/playframework/playframework/contributors","subscribers_url":"https://api.github.com/repos/playframework/playframework/subscribers","subscription_url":"https://api.github.com/repos/playframework/playframework/subscription","commits_url":"https://api.github.com/repos/playframework/playframework/commits{/sha}","git_commits_url":"https://api.github.com/repos/playframework/playframework/git/commits{/sha}","comments_url":"https://api.github.com/repos/playframework/playframework/comments{/number}","issue_comment_url":"https://api.github.com/repos/playframework/playframework/issues/comments{/number}","contents_url":"https://api.github.com/repos/playframework/playframework/contents/{+path}","compare_url":"https://api.github.com/repos/playframework/playframework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/playframework/playframework/merges","archive_url":"https://api.github.com/repos/playframework/playframework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/playframework/playframework/downloads","issues_url":"https://api.github.com/repos/playframework/playframework/issues{/number}","pulls_url":"https://api.github.com/repos/playframework/playframework/pulls{/number}","milestones_url":"https://api.github.com/repos/playframework/playframework/milestones{/number}","notifications_url":"https://api.github.com/repos/playframework/playframework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/playframework/playframework/labels{/name}","releases_url":"https://api.github.com/repos/playframework/playframework/releases{/id}","deployments_url":"https://api.github.com/repos/playframework/playframework/deployments","created_at":"2011-09-07T09:24:08Z","updated_at":"2016-05-04T19:16:02Z","pushed_at":"2016-05-04T20:54:01Z","git_url":"git://github.com/playframework/playframework.git","ssh_url":"git@github.com:playframework/playframework.git","clone_url":"https://github.com/playframework/playframework.git","svn_url":"https://github.com/playframework/playframework","homepage":"http://www.playframework.com/","size":93795,"stargazers_count":7808,"watchers_count":7808,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2712,"mirror_url":null,"open_issues_count":267,"forks":2712,"open_issues":267,"watchers":7808,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/playframework/playframework/pulls/5923"},"html":{"href":"https://github.com/playframework/playframework/pull/5923"},"issue":{"href":"https://api.github.com/repos/playframework/playframework/issues/5923"},"comments":{"href":"https://api.github.com/repos/playframework/playframework/issues/5923/comments"},"review_comments":{"href":"https://api.github.com/repos/playframework/playframework/pulls/5923/comments"},"review_comment":{"href":"https://api.github.com/repos/playframework/playframework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/playframework/playframework/pulls/5923/commits"},"statuses":{"href":"https://api.github.com/repos/playframework/playframework/statuses/d53d907f493abc1d0333499755ce3515293834d5"}}}}