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

Isn't setting value if lifetime to big and result in callback is true #345

Open
bbeygel opened this issue Apr 4, 2019 · 2 comments
Open

Comments

@bbeygel
Copy link

bbeygel commented Apr 4, 2019

After setting value with a half year lifetime value i got a result of true but when trying to get the same value for the same key, nothing was returned.

const time = 60 * 60 * 24 * 7 * 27; this.client.set(key, JSON.stringify(value), time, (err, res) => { if (err) { reject(err); } else { resolve(res); } });
res returns true.

@Exitare
Copy link

Exitare commented Jul 14, 2019

Had the same issues. No error while storing item. Pretty annoying.

@nmaves
Copy link

nmaves commented Aug 27, 2019

I think you both might be running into this issue.

When the expiration time specified is 30 days or more in seconds, Memcache treats the expiration as an absolute date by converting the number of seconds specified to a Unix epoch date. Be careful, because specifying 40 days in seconds will set the expiration to a time in 1970, which will yield unknown results.

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

3 participants