Cache anything that shouldn't be dynamic (example pagination is
dynamic, or user data).

I have some cached files that just represent a number, example:
1234345

Instead of querying the database how many users I have, just cache the
number every 24 hours.

On Dec 7, 1:27 pm, "Dave Maharaj" <m...@davemaharaj.com> wrote:
> Just public opinion question here. When you cache data I'm wondering when is
> not worth cache'ing if it's just a small bit of data to grab from the db.
>
> For example this is a small cached file I have:
>
> 1294435116
>
> a:1:{s:8:"Groupset";a:6:{s:2:"id";s:1:"9";s:5:"group";s:16:"Operations";s:4:
> "name";s:21:"Team
> Unit";s:4:"slug";s:7:"team_unit";s:9:"masters";s:1:"1";s:4:"indi";s:1:"1";}}
>
> Now looking at it I'm wondering is it even worth Caching? Does the process
> to check if its cached /if so if not do this that read  write or get, is
> that more demand that would be to simply just go get it with such a small
> bit of data.
>
> I have full large sets of data with joins / contains that are well worth
> caching since they get viewed over and over so that's a sure winner, but
> these small tid bits got me wondering here.
>
> Thanks,
>
> Dave

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

Reply via email to