I knew the solution was probably an obvious one. I know it may be bad
practice but I never used cache for anything ... ever. I'll give it a shot
and see what I come up with.

On Wed, Feb 2, 2011 at 1:21 PM, Miles J <[email protected]> wrote:

> Just cache the result. Then each time you try to access the data, it
> grabs from the cache instead of the DB.
>
> On Feb 2, 7:41 am, Ed Propsner <[email protected]> wrote:
> > I'm working on part of my app where I'm harvesting a list of ID's from
> the
> > db and passing the list to my view. It's a bit of work to get the initial
> > list so to minimize the load and NOT have to repeat the process with each
> > successive page load I would just like to pass the initial list back and
> > forth to the controller via Ajax. Right now I'm using
> > $ajax->remoteFunction() but it doesn't like an array as one of it's
> > parameters so I'm imploding the array, passing it through as a string,
> and
> > exploding it again back in the controller. This seems to work well for
> now
> > but what happens if the "list" I'm passing back and forth grows to the
> tens
> > of thousands? Can I safely pass that large of a string through
> > $ajax->remoteFunction()? I could be overlooking the obvious here but I'm
> > sure there must be another solution to this.
> >
> > example:
> >
> > $list = array(1, 2, 3, 4, 5, 6, 7, 8, 9);
> > $list  = implode(',', $list);
> >
> > $ajax->remoteFunction(
> >         array(
> >         'url' => array('controller' => 'someController', 'action' =>
> > 'someAction', $list),
> >         'update' => 'someElement')
> >     );
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> [email protected]<cake-php%[email protected]>For
>  more options, visit this group at
> http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to