Friday, February 26, 2010

Re: Counting in the Index View

Thanks for the responses. I've been playing with counterCache a bit
and this seems to be working well.

I appreciate the assistance!


On Wed, Feb 24, 2010 at 2:28 AM, WebbedIT <paul@webbedit.co.uk> wrote:
> @Cale: Cake has some more automagic goodness that helps with this
> situation perfectly.
>
> http://book.cakephp.org/view/816/counterCache-Cache-your-count
>
> Let cake automatically keep a count of vote counts and store them in
> the object being voted on, this means your doing less database calls
> as you only update the count when a vote is made and you can easily
> order the object results by number of votes etc.  No need to call a
> count query in your view, just pull the parent object record and the
> count is there and no need to loop through your index running extra
> counts.
>
> HTH
>
> Paul.
>
> 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
>

--
Testing.

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: