Closed deybhayden closed 10 years ago
This looks reasonable to me, I would only change if expire is None or expire < 0:
to if not expire or expire < 0:
but this is a semantic thing. However, since this is really a caching library, why would you be setting anything persistently? Are you sure the application is correct here?
I think the API should be more consistent, expire=None
should not have two different meanings in two different places. Let's make only expire <= 0
mean persistent.
This comes from issue #26. I made a simple change to check if expire was None or less than zero, and if so call set() instead of setx().