-
Notifications
You must be signed in to change notification settings - Fork 52
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
Expiration value could indicate clearer the two different modes (interval vs timestamp) #73
Comments
So, All ears if you think there is a good way to reflect this in the API, though! |
Could you inspect the TTL, and if over the 30 day limit, return an error if the epoch is in the past (before now)? If you are caching with a TTL, defining an expiry date in the past doesn't make a lot of sense. |
That's a possibility. I see a couple issues with that:
This seems like an unfortunate choice of the memcache protocol, but a choice we need to live with. This is a command that accepts two types of parameters, that happen to have the same type, without anything in the protocol to differentiate what the caller means (and an arbitrary cutoff point). I'd be open, instead to adding some type information to commands that accept a TTL to help a user be explicit about their choices. For example, I can imagine the TTL value taking an object that is either an |
Hi,
I was attempting to set the TTL value in milliseconds instead of seconds using the SET method. The value i was using for TTL was 1 hour. The SET command would complete without error, but any following GET requests could not find the data. After realizing the method expects TTL in seconds, everything worked as expected.
What is the maximum permitted TTL value? I know this is my own fault for not reading the documentation more closely, but it would be nice to receive an error message if the TTL value is invalid instead of silently failing.
Cheers, Adam.
The text was updated successfully, but these errors were encountered: