Tuesday, September 21, 2010

Re: Memcached not working on "default" settings

I use a mix of both honestly, file cache for more long term stuff and
memcache for things that require a shorter lifespan

On Sep 21, 1:08 pm, Miles J <mileswjohn...@gmail.com> wrote:
> I still have not gotten this to work. Im thinking of just setting
> default to file system cache and everything else to memcache.
>
> On Sep 21, 8:02 am, "j.blotus" <j.blo...@gmail.com> wrote:
>
>
>
> > I recently set up memcached as well, it's too bad that it doesn't give
> > you a great idea of how things are working behind the scenes.
>
> > On Sep 21, 1:27 am, Miles J <mileswjohn...@gmail.com> wrote:
>
> > > I just installed memcache for one of my apps and attempted to
> > > configure Cake to use it. When I changed "default" from File to
> > > Memcache, everything missed. I went from 0 to 300+ misses per request.
> > > I tried both of the following configs with the same result.
>
> > > Cache::config('default', array('engine' => 'Memcache'));
>
> > > Cache::config('default', array(
> > >         'engine' => 'Memcache',
> > >         'duration' => 3600,
> > >         'probability' => 100,
> > >         'prefix' => 'sc2_',
> > >         'servers' => array('127.0.0.1:11211'),
> > >         'compress' => true
> > > ));
>
> > > HOWEVER, when I created a custom config called "sql" that I use to
> > > cache all my database queries, that worked. I hit rate was about 75%
> > > compared to the "default" config. Both settings are exactly the same,
> > > but default never hits.
>
> > > Cache::config('default', array(
> > >         'engine' => 'Memcache',
> > >         'duration' => 3600,
> > >         'probability' => 100,
> > >         'prefix' => 'sc2_',
> > >         'servers' => array('127.0.0.1:11211'),
> > >         'compress' => true
> > > ));
>
> > > Cache::config('sql', array(
> > >         'engine' => 'Memcache',
> > >         'duration' => 3600,
> > >         'probability' => 100,
> > >         'prefix' => 'sc2_sql_',
> > >         'servers' => array('127.0.0.1:11211'),
> > >         'compress' => false
> > > ));
>
> > > I am really lost on this one. Any ideas?

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: