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

Expiration is buggy for periods over 30 days #36

Open
luksow opened this issue Jan 23, 2015 · 0 comments
Open

Expiration is buggy for periods over 30 days #36

luksow opened this issue Jan 23, 2015 · 0 comments

Comments

@luksow
Copy link

luksow commented Jan 23, 2015

Memcached interprets expirations over 30 days (so over 2592000 seconds) as UNIX timestamps (see https://code.google.com/p/memcached/wiki/NewProgramming#Expiration). That case is not handled in code, so when passing the 30 days threshold keys are immediately expired as the resulting "timestamp" is in the past.

I wanted to handle that by setting https://github.com/mumoshu/play2-memcached/blob/master/plugin/src/main/scala/com/github/mumoshu/play2/memcached/MemcachedPlugin.scala#L136 to System.currentTimeMillis() + expiration but it looks like memcached client is only handling ints so that would be extremely risky. Ideas?

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

1 participant