Welcome! Log In Create A New Profile

Advanced

what about the max expires time, 30days?

Posted by kedy211 
kedy211
what about the max expires time, 30days?
August 27, 2010 05:20AM
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
kedy211
Re: what about the max expires time, 30days?
August 27, 2010 05:30AM
Sorry, it's BUT, not bug. (but false when get.)

Best regards.

Kedy


On Fri, Aug 27, 2010 at 11:19 AM, kedy211 <[email protected]> wrote:

> 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
Dormando
Re: what about the max expires time, 30days?
August 27, 2010 05:30AM
Expire time turns into a unixtime date after 30 days. It's in the protocol.txt but possibly overlooked in the wiki :(

On Aug 26, 2010, at 8:19 PM, kedy211 <[email protected]> wrote:

> 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
kedy211
Re: what about the max expires time, 30days?
August 27, 2010 05:41AM
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


On Fri, Aug 27, 2010 at 11:26 AM, Dormando <[email protected]> wrote:

> Expire time turns into a unixtime date after 30 days. It's in the
> protocol.txt but possibly overlooked in the wiki :(
>
>
> On Aug 26, 2010, at 8:19 PM, kedy211 <[email protected]> wrote:
>
> 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
>
>
Brian Moon
Re: what about the max expires time, 30days?
August 27, 2010 05:50AM
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/
Sorry, only registered users may post in this forum.

Click here to login