On Jan 13, 1:01 pm, Adrian Arnautu <[email protected]> wrote:
> Hi,
>
> I think I find the problem.
> The keys like default_cake_sessions default_aros_acos default_acos and all
> the models like default_MODEL_NAME have an expiration of '+999 days'
>
> In cake/libs/cache.php at line 238 we have
> if (isset($settings['duration']) && !is_numeric($settings['duration'])) {
>     $settings['duration'] = strtotime($settings['duration']) - time();}
>
> which translates to: get me the timestamp for +999 days and then substract
> from it the timestamp for current time which leaves 1970 + 999 days

under what circumstances does strtotime return an invalid timestamp
(1970 isn't a timestamp, and strtotime('+ 999 days') isn't 0 either) ?

> which
> invalidates my awsome memcache key/value. And of couse, if I'll use the file
> cache probably it will be rewritten each and every time, I haven't test
> this.
> So far I don't know why that subtraction is there, why it is needed the
> differernce as a result if someone can illuminate me, please do.

does "duration" sound ike a timestamp to you?

The docs for memcached would also make great reading:
http://www.php.net/manual/en/memcached.expiration.php

alternatively, create a test case that demonstrates something's
broken :)

AD

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to