Question

Is there any way to set the memcachedClient set(String key,int exp,Object obj) method to Store object more than 30 days(2592000 second). If any then Explain please.

Was it helpful?

Solution

I believe you can set the expiry as a timestamp.

According to the documentation:

Expiration times can be set from 0, meaning "never expire", to 30 days. Any time higher than 30 days is interpreted as a unix timestamp date. If you want to expire an object on january 1st of next year, this is how you do that.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top