{"action":"created","issue":{"url":"https://api.github.com/repos/linsomniac/python-memcached/issues/151","repository_url":"https://api.github.com/repos/linsomniac/python-memcached","labels_url":"https://api.github.com/repos/linsomniac/python-memcached/issues/151/labels{/name}","comments_url":"https://api.github.com/repos/linsomniac/python-memcached/issues/151/comments","events_url":"https://api.github.com/repos/linsomniac/python-memcached/issues/151/events","html_url":"https://github.com/linsomniac/python-memcached/pull/151","id":378588642,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5MjU3MTg5","number":151,"title":"Get And Touch implementation","user":{"login":"svanellewee","id":1567439,"node_id":"MDQ6VXNlcjE1Njc0Mzk=","avatar_url":"https://avatars0.githubusercontent.com/u/1567439?v=4","gravatar_id":"","url":"https://api.github.com/users/svanellewee","html_url":"https://github.com/svanellewee","followers_url":"https://api.github.com/users/svanellewee/followers","following_url":"https://api.github.com/users/svanellewee/following{/other_user}","gists_url":"https://api.github.com/users/svanellewee/gists{/gist_id}","starred_url":"https://api.github.com/users/svanellewee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svanellewee/subscriptions","organizations_url":"https://api.github.com/users/svanellewee/orgs","repos_url":"https://api.github.com/users/svanellewee/repos","events_url":"https://api.github.com/users/svanellewee/events{/privacy}","received_events_url":"https://api.github.com/users/svanellewee/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-08T05:51:54Z","updated_at":"2018-11-08T06:40:02Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/linsomniac/python-memcached/pulls/151","html_url":"https://github.com/linsomniac/python-memcached/pull/151","diff_url":"https://github.com/linsomniac/python-memcached/pull/151.diff","patch_url":"https://github.com/linsomniac/python-memcached/pull/151.patch"},"body":"Good day!\r\nAdded Get And Touch Implementation with simple test case.\r\nAs per:\r\nhttps://github.com/memcached/memcached/blob/master/doc/protocol.txt#L348-L384\r\n\r\nQuestions:\r\n- Currently my change assumes latest memcache. Must I add some version check/bool config switch to either enable the gat calls or throw NotImplemented when underlying memcache is too old? (Please specify a preference)\r\n- are the test cases I added sufficient? I also did semi-manual testing using the following:\r\n\r\n```python\r\nfrom __future__ import print_function\r\nfrom memcache import Client\r\nimport random\r\nimport time\r\nclient = Client([\"127.0.0.1:11211\"], debug=1, cache_cas=True)\r\nttl = 1\r\nkey = \"greeting_{}\".format(random.randint(10,1000))\r\nprint(client.set(key, \"hello\", ttl))\r\nprint(20 * \"-\")\r\nreattempts = 10\r\nfor i in range(reattempts):\r\n    result = client.gets(key)\r\n    result = result if result is not None else \"Nothing!\" * 3\r\n    print(\"GETS: result === {}\".format(result))\r\n    time.sleep(0.5)\r\n    for cas_attempt in range(3):\r\n        cas_result = client.cas(key, \"hello\", ttl)\r\n        if not cas_result:\r\n            break\r\n        print(\"GETS: cas {}\".format(cas_attempt))\r\nkey = \"greeting_{}\".format(random.randint(10,1000))\r\nprint(client.set(key, \"hello\", ttl))\r\nprint(20 * \"-\")\r\nfor i in range(reattempts):\r\n    result = client.gats(key, 2)\r\n    result = result if result is not None else \"Nothing!\" * 3\r\n    print(\"GATS: result === {}\".format(result))\r\n    time.sleep(0.5)\r\n    for cas_attempt in range(3):\r\n        cas_result = client.cas(key, \"hello\", ttl)\r\n        if not cas_result:\r\n            break\r\n```"},"comment":{"url":"https://api.github.com/repos/linsomniac/python-memcached/issues/comments/436889483","html_url":"https://github.com/linsomniac/python-memcached/pull/151#issuecomment-436889483","issue_url":"https://api.github.com/repos/linsomniac/python-memcached/issues/151","id":436889483,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNjg4OTQ4Mw==","user":{"login":"svelleweetakealot","id":14922401,"node_id":"MDQ6VXNlcjE0OTIyNDAx","avatar_url":"https://avatars3.githubusercontent.com/u/14922401?v=4","gravatar_id":"","url":"https://api.github.com/users/svelleweetakealot","html_url":"https://github.com/svelleweetakealot","followers_url":"https://api.github.com/users/svelleweetakealot/followers","following_url":"https://api.github.com/users/svelleweetakealot/following{/other_user}","gists_url":"https://api.github.com/users/svelleweetakealot/gists{/gist_id}","starred_url":"https://api.github.com/users/svelleweetakealot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svelleweetakealot/subscriptions","organizations_url":"https://api.github.com/users/svelleweetakealot/orgs","repos_url":"https://api.github.com/users/svelleweetakealot/repos","events_url":"https://api.github.com/users/svelleweetakealot/events{/privacy}","received_events_url":"https://api.github.com/users/svelleweetakealot/received_events","type":"User","site_admin":false},"created_at":"2018-11-08T06:40:02Z","updated_at":"2018-11-08T06:40:02Z","author_association":"NONE","body":"Would it be okay if I update the travis.yml to use the latest memcached?"}}
{"actor":{"display_login":"svelleweetakealot"}}