1
votes

I'am Using Cakephp 2.4.6 and i want use the caching in my application. in my Bootstrap.php i found that

                  Cache::config('default', array('engine' => 'File'));

and in my core.php i found

             Cache::config('_cake_core_', array(
                                      'engine' => $engine,
                                      'prefix' => $prefix . 'cake_core_',
                                      'path' => CACHE . 'persistent' . DS,
                                      'serialize' => ($engine === 'File'),
                                      'duration' => $duration
                                   ));

Configure the cache for model and datasource caches. This cache configuration is used to store schema descriptions, and table listings in connections.

                      Cache::config('_cake_model_', array(
                                    'engine' => $engine,
                                    'prefix' => $prefix . 'cake_model_',
                                    'path' => CACHE . 'models' . DS,
                                    'serialize' => ($engine === 'File'),
                                    'duration' => $duration
                                    ));

After reading the document Cakephp CachingĀ¶ i have tried to cofigure Apc Cach in Core.php

                      Cache::config('default', array(
                                         'engine' => 'Apc',
                                       'duration'=> 9000,
                                           'probability'=> 100,
                                      'prefix' => Inflector::slug(APP_DIR) . '_',
                                     ));

it showing the error

  Fatal error: Uncaught exception 'CacheException' with message 
       'Cache engine default is not properly configured.' in        C:\xampp\htdocs\go4add\lib\Cake\Cache\Cache.php:181 Stack trace: #0 

then i tried it to configuring in bootstrap.php , same effect. Please help me..i am confusing..

Is there any Installation needed form Apc Cache and memcache in cakephp? if needed please tel me how to Instal Apc i nCakeph

1

1 Answers

1
votes

Don't touch any thing. Just change the $engine = 'File'; to $engine = 'Apc'; at core.php on line 352. And don't forget to install Apc.