Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling of Negative Timeouts different than python-memcached. #24

Closed
jacobb opened this issue Nov 27, 2010 · 7 comments
Closed

Handling of Negative Timeouts different than python-memcached. #24

jacobb opened this issue Nov 27, 2010 · 7 comments

Comments

@jacobb
Copy link

jacobb commented Nov 27, 2010

pylibmc currently treats negative timeout as long-lasting (assuming Default behavior of "Never"/0), while python-memcached has them expire immediately.

This should be modified to match python-memcached or have the difference noted in the documentation (currently giving me a bear of a trouble getting tests to pass adding pylibmc support into django 1.3 :))

@lericson
Copy link
Owner

lericson commented Dec 5, 2010

Hm, what is the point in keys that expire immediately? This, I feel, should rather raise an exception and be noted in the documentation. (also can't you just max(time, 0) it?)

@lericson
Copy link
Owner

Lack of input, so duly noted in documentation.

@jacobb
Copy link
Author

jacobb commented May 8, 2013

(bump)

It seems due to a change in memcache or libmemcache (I'm not sure which?), pylibmc is now behaving with the odd behavior of having negative timeouts auto-delete (set and immediately forget) keys. Should the docs be updated again, or an error be raised?

@jacobb
Copy link
Author

jacobb commented May 8, 2013

@lericson
Copy link
Owner

Not really sure what you're rooting for here. Do you want an exception to be raised?

@lericson lericson reopened this May 15, 2013
@jacobb
Copy link
Author

jacobb commented May 16, 2013

I think removing the doc note is good enough -- as bizarre of a functionality as having negative timeouts delete a key is, it's at least consistent across all interactions with memcache -- through libmemcached or not.

@jacobb
Copy link
Author

jacobb commented Aug 14, 2017

This is now covered more in depth in #202 , closing.

@jacobb jacobb closed this as completed Aug 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants