Skip to content
This repository has been archived by the owner on Dec 28, 2021. It is now read-only.

Time of exactly 30 days is treated as timestamp, not timedelta #11

Open
Quanyails opened this issue Sep 18, 2019 · 0 comments
Open

Time of exactly 30 days is treated as timestamp, not timedelta #11

Quanyails opened this issue Sep 18, 2019 · 0 comments

Comments

@Quanyails
Copy link

According to the Memcached wiki, expiration times in the range [0, 60*60*24*30] are treated as timedeltas, while anything higher is treated as a timestamp. The value 60*60*24*30 == 2592000 is currently treated as a timestamp when it should be a timedelta here.

Example:

import mockcache
mc_client = mockcache.Client()
mc_client.set('key', 'value', 60 * 60 * 24 * 30)
assert mc_client.get('key') is not None  # currently returns None
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant