enyim/EnyimMemcached — Issue #96: Absolute/relative expire time and MemcachedClient.GetExpiration
Author: mrbuzz
Created: 2012-02-01 23:41:33+00:00
State: open

The GetExpiration method was changed to absolute times to support > 30 days expiration or at least that's how I understand it...correct me if I'm wrong. I didn't realize this change happened during my recent update to the latest client. My application sets expiries < 5 seconds (for rate throttling purposes on certain API functions). Recently my web server and memcache server started drifting in time sync and it was causing crazy problems with rate throttling and some keys expiring immediately after set.

My question is this: If the 30 days is the reason for the change, why not autodetect the expiry time?
ie:
If < 30 days, use relative times
If > 30 days, use absolute times

That should work well for just about everybody and then something like a clock drift between servers wouldn't cause any major issues. Thoughts?

Lee