Sunday, July 26, 2009

Re: Cache not configured properly

i doubt that your memcache is working^^
actually, it falls back to "file caching" if memcache cannot be used:

trigger_error('Cache not configured properly. Please check
Cache::config(); in APP/config/core.php', E_USER_WARNING);
$cache = Cache::config('default', array('engine' => 'File'));

you can see that if you check out the default "home" page (home.ctp in
cake)


anyway.. in my case the problem seems to be that there is no
"Memcache" class

$memcache = new Memcache; $memcache->addServer('xxx.xx.xx.xx', 11211);
$version = $memcache->getVersion(); print_r($memcache->getExtendedStats
()); $cacheKey = $memcache->get("cake_homepage"); echo($cacheKey);
echo "<br>Server's version: ".$version."<br/>\n";

returns

Fatal error: Class 'Memcache' not found in /home/web/test/comm/views/
pages/homes.ctp on line 2


any idea whats missing here?
thx, mark


On 26 Jul., 13:18, euromark (München) <dereurom...@googlemail.com>
wrote:
> i get the same warning in debug mode.. just tested it
>
> On 26 Jul., 06:54, Eric <eric.winch...@gmail.com> wrote:
>
> > Turns out it is actually working, but I'd still like to fix the error
> > msg for debug mode if possible.
>
> > On Jul 25, 11:35 pm, "eric.winch...@gmail.com"
>
> > <eric.winch...@gmail.com> wrote:
> > > Warning (512): Cache not configured properly. Please check
> > > Cache::config(); in APP/config/core.php [CORE\cake\libs\configure.php,
> > > line 663]
>
> > > core.php:
>
> > > Configure::write('Cache.check', true);
> > > Configure::write('Cache.disable', false);
> > > Cache::config('default', array(
> > >                                                         'engine' => 'Memcache' //[required]
> > >                                                         'duration'=> 3600, //[optional]
> > >                                                         'probability'=> 100, //[optional]
> > >                                                         'servers' => array('127.0.0.1:11211'), //[optional]
> > >                                                         'compress' => false, // [optional] compress data in Memcache
> > > (slower, but uses less memory)
> > >                                                 )
> > > );
--~--~---------~--~----~------------~-------~--~----~
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: