Sunday, April 25, 2010

Re: cache key not working

More info-

It's 1.3 RC4 I believe. Not stable.... congratulations by the way!

Adding to original description, because I'm not sure if it matters,
but the element call is in a for loop:

foreach ($section['AssessmentQuestion'] as $question) {
echo $this->element('question', array("questionId" =>
$question['id'], "cache" => array('time'=> "+7 days",'key'=>'question'.
$question['id'])));
// works echo $this->element('question', array("questionId" =>
$question['id']));
}

On Apr 25, 8:18 pm, Todd McGrath <todd.mcgr...@gmail.com> wrote:
> Hi,
>
> See anything wrong with this:
> echo $this->element('question', array('questionId' => $question['id'],
> 'cache' => array('time'=> '+2 hours','key'=>$question['id'].'--
> question_id')));
>
> I'm getting the same result each time, but I know the $[question['id']
> is different.
>
> In other words, it's like the cache key is not being used.
>
> Using Cake 1.3 RC 4.
>
> If I put all the cache settings in this element call, everything works
> as expected.  But, I have a couple of requestAction in the element, so
> I'm hoping to get this working.  I've had it working fine in Cake 1.2
>
> Thoughts?  Ideas?
>
> Todd
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en

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 cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: