{"push_id":758064179,"size":1,"distinct_size":1,"ref":"refs/heads/fix-ttl-doc-non-existing-key","head":"2e040e3f03167a13d7d2c1c0af07367f62540639","before":"574ee2494174ded9eed125885c87a49bcc14317d","commits":[{"sha":"2e040e3f03167a13d7d2c1c0af07367f62540639","author":{"email":"d4d5da4143815a8d9a95e01de54d9fa4b1015f55@gmail.com","name":"renan-ranelli"},"message":"Fix Redis#{ttl,pttl} doc when key doesn't exist\n\nThe doc states that Redis#{ttl,pttl} return -1 if the key does not\nexist **or** if the key exists but has no associated expire.\n\nThis is incorrect with respect to the Redis' doc [here](http://redis.io/commands/ttl)\n\nThe documentation is also incorrent with respect to the current library behavior:\n\n```\nirb(main):059:0* conn = Redis.new\n=> #<Redis client v3.1.0 for redis://127.0.0.1:6379/0>\nirb(main):060:0> conn.ttl 'asdf'\n=> -2\nirb(main):065:0> conn.set 'asdf', 123\n=> \"OK\"\nirb(main):070:0> conn.ttl 'asdf'\n=> -1\nirb(main):071:0> conn.expire 'asdf', 100\n=> true\nirb(main):082:0> conn.ttl 'asdf'\n=> 99\n\nirb(main):059:0* conn = Redis.new\n=> #<Redis client v3.1.0 for redis://127.0.0.1:6379/0>\nirb(main):085:0> conn.pttl 'jkl;'\n=> -2\nirb(main):086:0> conn.set 'jkl;', 123\n=> \"OK\"\nirb(main):089:0> conn.pttl 'jkl;'\n=> -1\nirb(main):090:0> conn.expire 'jkl;', 100\n=> true\nirb(main):093:0> conn.pttl 'jkl;'\n=> 91225\nirb(main):097:0>\n```\n\nThis commit adds the mention to a `-2` return value.","distinct":true,"url":"https://api.github.com/repos/rranelli/redis-rb/commits/2e040e3f03167a13d7d2c1c0af07367f62540639"}]}