Skip to content

client.set with time not expire after incr(with passcode) #240

@liyangshiren

Description

@liyangshiren

docker run -p 11231:11211 -it -d --name test_memcached3 -e MEMCACHED_USERNAME=my_user -e MEMCACHED_PASSWORD=my_password bitnami/memcached:latest
=====pip install================
pip install python-binary-memcached
=======python script==============
import bmemcached

client = bmemcached.Client('127.0.0.1:11231', 'my_user', 'my_password')
client.set('user_id', 1, time=2)

if name == "main":
while True:
client.incr('user_id', 1)
hints = client.get('user_id')
print('hints:', hints)

=======issue=======
hints will never be none

Compare with normal without passcode

docker run -p 11221:11211 -it -d --name test_memcached2 bitnami/memcached:latest

pip install python-memcached

import memcache

client = memcache.Client(['127.0.0.1:11221'], debug=0)
client.set('user_id', 1, 2)
if name == "main":
while True:
client.incr('user_id', 1)
hints = client.get('user_id')
print('hints:', hints)
=====issue====
hints will be None after 2 seconds

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions