{"action":"opened","number":597,"pull_request":{"url":"https://api.github.com/repos/petergoldstein/dalli/pulls/597","id":57803017,"html_url":"https://github.com/petergoldstein/dalli/pull/597","diff_url":"https://github.com/petergoldstein/dalli/pull/597.diff","patch_url":"https://github.com/petergoldstein/dalli/pull/597.patch","issue_url":"https://api.github.com/repos/petergoldstein/dalli/issues/597","number":597,"state":"open","locked":false,"title":"Add #cas! method that yields whether or not the key exists","user":{"login":"mwpastore","id":8540936,"avatar_url":"https://avatars.githubusercontent.com/u/8540936?v=3","gravatar_id":"","url":"https://api.github.com/users/mwpastore","html_url":"https://github.com/mwpastore","followers_url":"https://api.github.com/users/mwpastore/followers","following_url":"https://api.github.com/users/mwpastore/following{/other_user}","gists_url":"https://api.github.com/users/mwpastore/gists{/gist_id}","starred_url":"https://api.github.com/users/mwpastore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwpastore/subscriptions","organizations_url":"https://api.github.com/users/mwpastore/orgs","repos_url":"https://api.github.com/users/mwpastore/repos","events_url":"https://api.github.com/users/mwpastore/events{/privacy}","received_events_url":"https://api.github.com/users/mwpastore/received_events","type":"User","site_admin":false},"body":"Looking for a variant of the #cas method that yields to the block whether or not the key already exists. This is to avoid having to do things like:\r\n\r\n```ruby\r\nresult = dc.cas(key) { |oldvalue| newvalue }\r\nresult = dc.add(key, newvalue) if result.nil?\r\n```\r\n\r\nThanks in advance.","created_at":"2016-02-01T06:54:34Z","updated_at":"2016-02-01T06:54:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/petergoldstein/dalli/pulls/597/commits","review_comments_url":"https://api.github.com/repos/petergoldstein/dalli/pulls/597/comments","review_comment_url":"https://api.github.com/repos/petergoldstein/dalli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/petergoldstein/dalli/issues/597/comments","statuses_url":"https://api.github.com/repos/petergoldstein/dalli/statuses/6172172c406465d74dc3546c15e44b88fde58c59","head":{"label":"mwpastore:cas-force","ref":"cas-force","sha":"6172172c406465d74dc3546c15e44b88fde58c59","user":{"login":"mwpastore","id":8540936,"avatar_url":"https://avatars.githubusercontent.com/u/8540936?v=3","gravatar_id":"","url":"https://api.github.com/users/mwpastore","html_url":"https://github.com/mwpastore","followers_url":"https://api.github.com/users/mwpastore/followers","following_url":"https://api.github.com/users/mwpastore/following{/other_user}","gists_url":"https://api.github.com/users/mwpastore/gists{/gist_id}","starred_url":"https://api.github.com/users/mwpastore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwpastore/subscriptions","organizations_url":"https://api.github.com/users/mwpastore/orgs","repos_url":"https://api.github.com/users/mwpastore/repos","events_url":"https://api.github.com/users/mwpastore/events{/privacy}","received_events_url":"https://api.github.com/users/mwpastore/received_events","type":"User","site_admin":false},"repo":{"id":50328342,"name":"dalli","full_name":"mwpastore/dalli","owner":{"login":"mwpastore","id":8540936,"avatar_url":"https://avatars.githubusercontent.com/u/8540936?v=3","gravatar_id":"","url":"https://api.github.com/users/mwpastore","html_url":"https://github.com/mwpastore","followers_url":"https://api.github.com/users/mwpastore/followers","following_url":"https://api.github.com/users/mwpastore/following{/other_user}","gists_url":"https://api.github.com/users/mwpastore/gists{/gist_id}","starred_url":"https://api.github.com/users/mwpastore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwpastore/subscriptions","organizations_url":"https://api.github.com/users/mwpastore/orgs","repos_url":"https://api.github.com/users/mwpastore/repos","events_url":"https://api.github.com/users/mwpastore/events{/privacy}","received_events_url":"https://api.github.com/users/mwpastore/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mwpastore/dalli","description":"High performance memcached client for Ruby","fork":true,"url":"https://api.github.com/repos/mwpastore/dalli","forks_url":"https://api.github.com/repos/mwpastore/dalli/forks","keys_url":"https://api.github.com/repos/mwpastore/dalli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mwpastore/dalli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mwpastore/dalli/teams","hooks_url":"https://api.github.com/repos/mwpastore/dalli/hooks","issue_events_url":"https://api.github.com/repos/mwpastore/dalli/issues/events{/number}","events_url":"https://api.github.com/repos/mwpastore/dalli/events","assignees_url":"https://api.github.com/repos/mwpastore/dalli/assignees{/user}","branches_url":"https://api.github.com/repos/mwpastore/dalli/branches{/branch}","tags_url":"https://api.github.com/repos/mwpastore/dalli/tags","blobs_url":"https://api.github.com/repos/mwpastore/dalli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mwpastore/dalli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mwpastore/dalli/git/refs{/sha}","trees_url":"https://api.github.com/repos/mwpastore/dalli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mwpastore/dalli/statuses/{sha}","languages_url":"https://api.github.com/repos/mwpastore/dalli/languages","stargazers_url":"https://api.github.com/repos/mwpastore/dalli/stargazers","contributors_url":"https://api.github.com/repos/mwpastore/dalli/contributors","subscribers_url":"https://api.github.com/repos/mwpastore/dalli/subscribers","subscription_url":"https://api.github.com/repos/mwpastore/dalli/subscription","commits_url":"https://api.github.com/repos/mwpastore/dalli/commits{/sha}","git_commits_url":"https://api.github.com/repos/mwpastore/dalli/git/commits{/sha}","comments_url":"https://api.github.com/repos/mwpastore/dalli/comments{/number}","issue_comment_url":"https://api.github.com/repos/mwpastore/dalli/issues/comments{/number}","contents_url":"https://api.github.com/repos/mwpastore/dalli/contents/{+path}","compare_url":"https://api.github.com/repos/mwpastore/dalli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mwpastore/dalli/merges","archive_url":"https://api.github.com/repos/mwpastore/dalli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mwpastore/dalli/downloads","issues_url":"https://api.github.com/repos/mwpastore/dalli/issues{/number}","pulls_url":"https://api.github.com/repos/mwpastore/dalli/pulls{/number}","milestones_url":"https://api.github.com/repos/mwpastore/dalli/milestones{/number}","notifications_url":"https://api.github.com/repos/mwpastore/dalli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mwpastore/dalli/labels{/name}","releases_url":"https://api.github.com/repos/mwpastore/dalli/releases{/id}","deployments_url":"https://api.github.com/repos/mwpastore/dalli/deployments","created_at":"2016-01-25T05:29:27Z","updated_at":"2016-01-25T05:29:28Z","pushed_at":"2016-02-01T06:52:07Z","git_url":"git://github.com/mwpastore/dalli.git","ssh_url":"git@github.com:mwpastore/dalli.git","clone_url":"https://github.com/mwpastore/dalli.git","svn_url":"https://github.com/mwpastore/dalli","homepage":"","size":1015,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"petergoldstein:master","ref":"master","sha":"0ab6fd1adc543f7c1c221c22b04e6375a3194b2b","user":{"login":"petergoldstein","id":421488,"avatar_url":"https://avatars.githubusercontent.com/u/421488?v=3","gravatar_id":"","url":"https://api.github.com/users/petergoldstein","html_url":"https://github.com/petergoldstein","followers_url":"https://api.github.com/users/petergoldstein/followers","following_url":"https://api.github.com/users/petergoldstein/following{/other_user}","gists_url":"https://api.github.com/users/petergoldstein/gists{/gist_id}","starred_url":"https://api.github.com/users/petergoldstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petergoldstein/subscriptions","organizations_url":"https://api.github.com/users/petergoldstein/orgs","repos_url":"https://api.github.com/users/petergoldstein/repos","events_url":"https://api.github.com/users/petergoldstein/events{/privacy}","received_events_url":"https://api.github.com/users/petergoldstein/received_events","type":"User","site_admin":false},"repo":{"id":844146,"name":"dalli","full_name":"petergoldstein/dalli","owner":{"login":"petergoldstein","id":421488,"avatar_url":"https://avatars.githubusercontent.com/u/421488?v=3","gravatar_id":"","url":"https://api.github.com/users/petergoldstein","html_url":"https://github.com/petergoldstein","followers_url":"https://api.github.com/users/petergoldstein/followers","following_url":"https://api.github.com/users/petergoldstein/following{/other_user}","gists_url":"https://api.github.com/users/petergoldstein/gists{/gist_id}","starred_url":"https://api.github.com/users/petergoldstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petergoldstein/subscriptions","organizations_url":"https://api.github.com/users/petergoldstein/orgs","repos_url":"https://api.github.com/users/petergoldstein/repos","events_url":"https://api.github.com/users/petergoldstein/events{/privacy}","received_events_url":"https://api.github.com/users/petergoldstein/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/petergoldstein/dalli","description":"High performance memcached client for Ruby","fork":false,"url":"https://api.github.com/repos/petergoldstein/dalli","forks_url":"https://api.github.com/repos/petergoldstein/dalli/forks","keys_url":"https://api.github.com/repos/petergoldstein/dalli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/petergoldstein/dalli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/petergoldstein/dalli/teams","hooks_url":"https://api.github.com/repos/petergoldstein/dalli/hooks","issue_events_url":"https://api.github.com/repos/petergoldstein/dalli/issues/events{/number}","events_url":"https://api.github.com/repos/petergoldstein/dalli/events","assignees_url":"https://api.github.com/repos/petergoldstein/dalli/assignees{/user}","branches_url":"https://api.github.com/repos/petergoldstein/dalli/branches{/branch}","tags_url":"https://api.github.com/repos/petergoldstein/dalli/tags","blobs_url":"https://api.github.com/repos/petergoldstein/dalli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/petergoldstein/dalli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/petergoldstein/dalli/git/refs{/sha}","trees_url":"https://api.github.com/repos/petergoldstein/dalli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/petergoldstein/dalli/statuses/{sha}","languages_url":"https://api.github.com/repos/petergoldstein/dalli/languages","stargazers_url":"https://api.github.com/repos/petergoldstein/dalli/stargazers","contributors_url":"https://api.github.com/repos/petergoldstein/dalli/contributors","subscribers_url":"https://api.github.com/repos/petergoldstein/dalli/subscribers","subscription_url":"https://api.github.com/repos/petergoldstein/dalli/subscription","commits_url":"https://api.github.com/repos/petergoldstein/dalli/commits{/sha}","git_commits_url":"https://api.github.com/repos/petergoldstein/dalli/git/commits{/sha}","comments_url":"https://api.github.com/repos/petergoldstein/dalli/comments{/number}","issue_comment_url":"https://api.github.com/repos/petergoldstein/dalli/issues/comments{/number}","contents_url":"https://api.github.com/repos/petergoldstein/dalli/contents/{+path}","compare_url":"https://api.github.com/repos/petergoldstein/dalli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/petergoldstein/dalli/merges","archive_url":"https://api.github.com/repos/petergoldstein/dalli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/petergoldstein/dalli/downloads","issues_url":"https://api.github.com/repos/petergoldstein/dalli/issues{/number}","pulls_url":"https://api.github.com/repos/petergoldstein/dalli/pulls{/number}","milestones_url":"https://api.github.com/repos/petergoldstein/dalli/milestones{/number}","notifications_url":"https://api.github.com/repos/petergoldstein/dalli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/petergoldstein/dalli/labels{/name}","releases_url":"https://api.github.com/repos/petergoldstein/dalli/releases{/id}","deployments_url":"https://api.github.com/repos/petergoldstein/dalli/deployments","created_at":"2010-08-17T16:56:58Z","updated_at":"2016-02-01T01:33:11Z","pushed_at":"2016-01-31T21:39:47Z","git_url":"git://github.com/petergoldstein/dalli.git","ssh_url":"git@github.com:petergoldstein/dalli.git","clone_url":"https://github.com/petergoldstein/dalli.git","svn_url":"https://github.com/petergoldstein/dalli","homepage":"","size":1225,"stargazers_count":2476,"watchers_count":2476,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":296,"mirror_url":null,"open_issues_count":37,"forks":296,"open_issues":37,"watchers":2476,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/petergoldstein/dalli/pulls/597"},"html":{"href":"https://github.com/petergoldstein/dalli/pull/597"},"issue":{"href":"https://api.github.com/repos/petergoldstein/dalli/issues/597"},"comments":{"href":"https://api.github.com/repos/petergoldstein/dalli/issues/597/comments"},"review_comments":{"href":"https://api.github.com/repos/petergoldstein/dalli/pulls/597/comments"},"review_comment":{"href":"https://api.github.com/repos/petergoldstein/dalli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/petergoldstein/dalli/pulls/597/commits"},"statuses":{"href":"https://api.github.com/repos/petergoldstein/dalli/statuses/6172172c406465d74dc3546c15e44b88fde58c59"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":17,"deletions":0,"changed_files":1}}