what about the max expires time, 30days?

Showing 1-5 of 5 messages
what about the max expires time, 30days? Kedy 8/26/10 8:19 PM
It's unusually the question I mentioned in the topic. And, I can NOT find the offical answer from wiki.

Sometime, I set the expire time as '86400 * 24 * 4', the func memcached->set will return true, bug false when get.

I have tested the max expire time, the result is 86400 * 24 * 1.25, in others words: 30 days.

So what about the max time in your server? Does it relations to the hardware or it's own version?

My OS & env Info:
Dell PE R610
Intel(R) Xeon(R) CPU E5504  @ 2.00GHz * 2
16G memory
Linux mdev 2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
Memcached ver: 1.0.1




Best regards.

Kedy
Re: what about the max expires time, 30days? Kedy 8/26/10 8:25 PM
Sorry, it's BUT, not bug. (but false when get.)

Best regards.

Kedy
Re: what about the max expires time, 30days? Dormando 8/26/10 8:26 PM
Expire time turns into a unixtime date after 30 days. It's in the protocol.txt but possibly overlooked in the wiki :(
Re: what about the max expires time, 30days? Kedy 8/26/10 8:38 PM
Thanks.
 
I got the defined code in the memcached.c:
 
#define REALTIME_MAXDELTA 60*60*24*30

It's extreme question. DB or filecahce will be smart choise when it's necessary to cache sth more than 3days.


Kedy
Re: what about the max expires time, 30days? brianlmoon 8/26/10 8:46 PM
On 8/26/10 10:38 PM, kedy211 wrote:
> Thanks.
> I got the defined code in the memcached.c:
> #define REALTIME_MAXDELTA 60*60*24*30
>
> It's extreme question. DB or filecahce will be smart choise when it's
> necessary to cache sth more than 3days.

The best solution is to always use a unix timestamp. If you want a 300
second ttl, set the ttl to time() + 300. Then you never have to worry
about it.

--

Brian.
--------
http://brian.moonspot.net/