From 30a9543a65c95d9eb07feae0aebde97b9b1ca6eb Mon Sep 17 00:00:00 2001 From: mark_story Date: Sat, 12 Mar 2011 12:19:06 -0500 Subject: [PATCH] Syncing skel folder with app folder. --- .../templates/skel/config/bootstrap.php | 14 +++++-- cake/console/templates/skel/config/core.php | 38 ++++++++++++++++++- 2 files changed, 47 insertions(+), 5 deletions(-) diff --git a/cake/console/templates/skel/config/bootstrap.php b/cake/console/templates/skel/config/bootstrap.php index 697274852..2e36a893e 100644 --- a/cake/console/templates/skel/config/bootstrap.php +++ b/cake/console/templates/skel/config/bootstrap.php @@ -1,9 +1,12 @@ 'File')); + /** * The settings below can be used to set additional paths to models, views and controllers. * This is related to Ticket #470 (https://trac.cakephp.org/ticket/470) @@ -28,7 +34,7 @@ * 'plugins' => array('/full/path/to/plugins/', '/next/full/path/to/plugins/'), * 'models' => array('/full/path/to/models/', '/next/full/path/to/models/'), * 'views' => array('/full/path/to/views/', '/next/full/path/to/views/'), - * 'controllers' => array(/full/path/to/controllers/', '/next/full/path/to/controllers/'), + * 'controllers' => array('/full/path/to/controllers/', '/next/full/path/to/controllers/'), * 'datasources' => array('/full/path/to/datasources/', '/next/full/path/to/datasources/'), * 'behaviors' => array('/full/path/to/behaviors/', '/next/full/path/to/behaviors/'), * 'components' => array('/full/path/to/components/', '/next/full/path/to/components/'), diff --git a/cake/console/templates/skel/config/core.php b/cake/console/templates/skel/config/core.php index 9744da06c..3a7613b85 100644 --- a/cake/console/templates/skel/config/core.php +++ b/cake/console/templates/skel/config/core.php @@ -283,4 +283,40 @@ * )); * */ - Cache::config('default', array('engine' => 'File')); + +// Pick the caching engine to use. If APC is enabled use it. +$engine = 'File'; +if (extension_loaded('apc')) { + $engine = 'Apc'; +} + +// In development mode, caches should expire quickly. +$duration = '+999 days'; +if (Configure::read('debug') >= 1) { + $duration = '+10 seconds'; +} + +/** + * Configure the cache used for general framework caching. Path information, + * object listings, and translation cache files are stored with this configuration. + */ +Cache::config('_cake_core_', array( + 'engine' => $engine, + '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' => 'cake_model_', + 'path' => CACHE . 'models' . DS, + 'serialize' => ($engine === 'File'), + 'duration' => $duration +)); +