2005-07-04 01:07:14 +00:00
|
|
|
<?php
|
2005-06-21 16:48:06 +00:00
|
|
|
/**
|
2005-12-23 21:57:26 +00:00
|
|
|
* This is core configuration file.
|
|
|
|
*
|
2007-09-30 07:45:34 +00:00
|
|
|
* Use it to configure core behavior of Cake.
|
2005-08-21 06:49:02 +00:00
|
|
|
*
|
2010-10-03 16:38:58 +00:00
|
|
|
* PHP 5
|
2005-08-21 06:49:02 +00:00
|
|
|
*
|
2009-11-06 06:46:59 +00:00
|
|
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
2012-03-13 02:46:46 +00:00
|
|
|
* Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
2005-08-21 06:49:02 +00:00
|
|
|
*
|
2005-12-23 21:57:26 +00:00
|
|
|
* Licensed under The MIT License
|
|
|
|
* Redistributions of files must retain the above copyright notice.
|
2005-08-21 06:49:02 +00:00
|
|
|
*
|
2012-03-13 02:46:46 +00:00
|
|
|
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
2009-11-06 06:00:11 +00:00
|
|
|
* @link http://cakephp.org CakePHP(tm) Project
|
2011-10-14 19:06:36 +00:00
|
|
|
* @package app.Config
|
2008-10-30 17:30:26 +00:00
|
|
|
* @since CakePHP(tm) v 0.2.9
|
2009-11-06 06:51:51 +00:00
|
|
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
2006-05-26 05:29:17 +00:00
|
|
|
*/
|
2009-09-10 15:32:21 +00:00
|
|
|
|
2007-02-17 18:38:36 +00:00
|
|
|
/**
|
|
|
|
* CakePHP Debug Level:
|
2007-04-30 06:01:54 +00:00
|
|
|
*
|
2007-02-17 18:38:36 +00:00
|
|
|
* Production Mode:
|
|
|
|
* 0: No error messages, errors, or warnings shown. Flash messages redirect.
|
2007-04-30 06:01:54 +00:00
|
|
|
*
|
2007-02-17 18:38:36 +00:00
|
|
|
* Development Mode:
|
|
|
|
* 1: Errors and warnings shown, model caches refreshed, flash messages halted.
|
|
|
|
* 2: As in 1, but also with full debug messages and SQL output.
|
[1242]
Author: phpnut
Date: 6:19:00 PM, Thursday, October 27, 2005
Message:
removing session directory
[1241]
Author: phpnut
Date: 6:13:46 PM, Thursday, October 27, 2005
Message:
added docblocks and temp error messages when trying to use the unimplemeted database for sessions
[1239]
Author: phpnut
Date: 5:28:57 PM, Thursday, October 27, 2005
Message:
More work on session.
Added config settings to core.php
updated model to allow models without a database table.
[1237]
Author: phpnut
Date: 3:50:27 PM, Thursday, October 27, 2005
Message:
adding directories for sessions
[1235]
Author: phpnut
Date: 3:36:08 AM, Thursday, October 27, 2005
Message:
Typo
[1234]
Author: phpnut
Date: 3:34:07 AM, Thursday, October 27, 2005
Message:
More work on the Session classes and adding the first methods the to Security class
[1233]
Author: phpnut
Date: 3:05:46 AM, Thursday, October 27, 2005
Message:
Start to core security class added.
Moved paths.php to cake/config/
Refactoring Session classes
[1232]
Author: phpnut
Date: 2:20:25 AM, Thursday, October 27, 2005
Message:
More work on the core session class.
Adding session component class.
Added fix for errors messages not working with validation.
Added possible fix for inflector now working on the word status.
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@1243 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-10-27 23:29:56 +00:00
|
|
|
*
|
2007-02-17 18:38:36 +00:00
|
|
|
* In production mode, flash messages redirect after a time interval.
|
|
|
|
* In development mode, you need to click the flash message to continue.
|
2005-06-21 16:48:06 +00:00
|
|
|
*/
|
2009-09-18 00:25:44 +00:00
|
|
|
Configure::write('debug', 2);
|
2009-09-10 15:32:21 +00:00
|
|
|
|
2010-11-15 01:42:48 +00:00
|
|
|
/**
|
2013-02-03 19:00:32 +00:00
|
|
|
* Configure the Error handler used to handle errors for your application. By default
|
|
|
|
* ErrorHandler::handleError() is used. It will display errors using Debugger, when debug > 0
|
2010-11-15 01:56:03 +00:00
|
|
|
* and log errors with CakeLog when debug = 0.
|
|
|
|
*
|
|
|
|
* Options:
|
|
|
|
*
|
2012-04-01 20:55:12 +00:00
|
|
|
* - `handler` - callback - The callback to handle errors. You can set this to any callable type,
|
2012-12-27 12:18:52 +00:00
|
|
|
* including anonymous functions.
|
|
|
|
* Make sure you add App::uses('MyHandler', 'Error'); when using a custom handler class
|
2010-11-15 04:24:12 +00:00
|
|
|
* - `level` - int - The level of errors you are interested in capturing.
|
|
|
|
* - `trace` - boolean - Include stack traces for errors in log files.
|
2010-11-28 00:39:55 +00:00
|
|
|
*
|
|
|
|
* @see ErrorHandler for more information on error handling and configuration.
|
2010-11-15 01:42:48 +00:00
|
|
|
*/
|
|
|
|
Configure::write('Error', array(
|
|
|
|
'handler' => 'ErrorHandler::handleError',
|
2010-11-15 04:24:12 +00:00
|
|
|
'level' => E_ALL & ~E_DEPRECATED,
|
2012-03-31 21:51:43 +00:00
|
|
|
'trace' => true
|
2010-11-15 01:42:48 +00:00
|
|
|
));
|
|
|
|
|
|
|
|
/**
|
2013-02-03 19:00:32 +00:00
|
|
|
* Configure the Exception handler used for uncaught exceptions. By default,
|
2011-04-17 09:48:51 +00:00
|
|
|
* ErrorHandler::handleException() is used. It will display a HTML page for the exception, and
|
2013-02-03 19:00:32 +00:00
|
|
|
* while debug > 0, framework errors like Missing Controller will be displayed. When debug = 0,
|
2010-11-15 04:24:12 +00:00
|
|
|
* framework errors will be coerced into generic HTTP errors.
|
2010-11-15 04:33:46 +00:00
|
|
|
*
|
|
|
|
* Options:
|
|
|
|
*
|
2011-04-17 09:48:51 +00:00
|
|
|
* - `handler` - callback - The callback to handle exceptions. You can set this to any callback type,
|
2010-11-15 04:33:46 +00:00
|
|
|
* including anonymous functions.
|
2012-12-27 12:18:52 +00:00
|
|
|
* Make sure you add App::uses('MyHandler', 'Error'); when using a custom handler class
|
2013-02-03 19:00:32 +00:00
|
|
|
* - `renderer` - string - The class responsible for rendering uncaught exceptions. If you choose a custom class you
|
2011-10-23 19:55:20 +00:00
|
|
|
* should place the file for that class in app/Lib/Error. This class needs to implement a render method.
|
2010-11-15 04:33:46 +00:00
|
|
|
* - `log` - boolean - Should Exceptions be logged?
|
2010-11-28 00:39:55 +00:00
|
|
|
*
|
|
|
|
* @see ErrorHandler for more information on exception handling and configuration.
|
2010-11-15 01:42:48 +00:00
|
|
|
*/
|
|
|
|
Configure::write('Exception', array(
|
2010-11-15 04:33:46 +00:00
|
|
|
'handler' => 'ErrorHandler::handleException',
|
2010-11-23 04:02:01 +00:00
|
|
|
'renderer' => 'ExceptionRenderer',
|
2010-11-15 04:33:46 +00:00
|
|
|
'log' => true
|
2010-11-15 01:42:48 +00:00
|
|
|
));
|
|
|
|
|
2007-12-25 09:08:36 +00:00
|
|
|
/**
|
|
|
|
* Application wide charset encoding
|
|
|
|
*/
|
|
|
|
Configure::write('App.encoding', 'UTF-8');
|
2009-09-10 15:32:21 +00:00
|
|
|
|
2007-10-15 21:56:31 +00:00
|
|
|
/**
|
|
|
|
* To configure CakePHP *not* to use mod_rewrite and to
|
|
|
|
* use CakePHP pretty URLs, remove these .htaccess
|
|
|
|
* files:
|
|
|
|
*
|
|
|
|
* /.htaccess
|
|
|
|
* /app/.htaccess
|
|
|
|
* /app/webroot/.htaccess
|
|
|
|
*
|
2013-02-02 19:17:10 +00:00
|
|
|
* And uncomment the App.baseUrl below. But keep in mind
|
|
|
|
* that plugin assets such as images, CSS and Javascript files
|
|
|
|
* will not work without url rewriting
|
|
|
|
* To work around this issue you should either symlink or copy
|
|
|
|
* the plugin assets into you app's webroot directory. This is
|
|
|
|
* recommended even when you are using mod_rewrite. Handling static
|
|
|
|
* assets through the Dispatcher is incredibly inefficient and
|
|
|
|
* included primarily as a development convenience - and
|
|
|
|
* thus not recommended for production applications.
|
2007-10-15 21:56:31 +00:00
|
|
|
*/
|
|
|
|
//Configure::write('App.baseUrl', env('SCRIPT_NAME'));
|
2009-09-10 15:32:21 +00:00
|
|
|
|
2007-10-15 21:56:31 +00:00
|
|
|
/**
|
2009-11-13 15:26:57 +00:00
|
|
|
* Uncomment the define below to use CakePHP prefix routes.
|
2007-10-15 21:56:31 +00:00
|
|
|
*
|
2009-11-12 04:03:57 +00:00
|
|
|
* The value of the define determines the names of the routes
|
|
|
|
* and their associated controller actions:
|
2007-10-15 21:56:31 +00:00
|
|
|
*
|
2010-01-15 21:56:26 +00:00
|
|
|
* Set to an array of prefixes you want to use in your application. Use for
|
2009-09-27 04:18:24 +00:00
|
|
|
* admin or other prefixed routes.
|
|
|
|
*
|
|
|
|
* Routing.prefixes = array('admin', 'manager');
|
|
|
|
*
|
|
|
|
* Enables:
|
|
|
|
* `admin_index()` and `/admin/controller/index`
|
|
|
|
* `manager_index()` and `/manager/controller/index`
|
2009-11-13 15:26:57 +00:00
|
|
|
*
|
2009-09-27 04:18:24 +00:00
|
|
|
*/
|
|
|
|
//Configure::write('Routing.prefixes', array('admin'));
|
|
|
|
|
2007-10-01 18:58:35 +00:00
|
|
|
/**
|
2007-10-15 21:56:31 +00:00
|
|
|
* Turn off all caching application-wide.
|
2007-10-01 18:58:35 +00:00
|
|
|
*
|
|
|
|
*/
|
2007-10-15 21:56:31 +00:00
|
|
|
//Configure::write('Cache.disable', true);
|
2009-09-10 15:32:21 +00:00
|
|
|
|
2006-03-12 00:11:40 +00:00
|
|
|
/**
|
2007-10-15 21:56:31 +00:00
|
|
|
* Enable cache checking.
|
|
|
|
*
|
|
|
|
* If set to true, for view caching you must still use the controller
|
2010-04-04 07:14:14 +00:00
|
|
|
* public $cacheAction inside your controllers to define caching settings.
|
|
|
|
* You can either set it controller-wide by setting public $cacheAction = true,
|
2007-10-15 21:56:31 +00:00
|
|
|
* or in each action using $this->cacheAction = true.
|
2007-04-30 06:01:54 +00:00
|
|
|
*
|
2006-03-12 00:11:40 +00:00
|
|
|
*/
|
2007-10-15 21:56:31 +00:00
|
|
|
//Configure::write('Cache.check', true);
|
2009-09-10 15:32:21 +00:00
|
|
|
|
2012-12-11 11:54:16 +00:00
|
|
|
/**
|
|
|
|
* Enable cache view prefixes.
|
|
|
|
*
|
|
|
|
* If set it will be prepended to the cache name for view file caching. This is
|
|
|
|
* helpful if you deploy the same application via multiple subdomains and languages,
|
|
|
|
* for instance. Each version can then have its own view cache namespace.
|
|
|
|
* Note: The final cache file name will then be `prefix_cachefilename`.
|
|
|
|
*/
|
|
|
|
//Configure::write('Cache.viewPrefix', 'prefix');
|
|
|
|
|
2006-02-08 15:25:34 +00:00
|
|
|
/**
|
2007-04-30 06:01:54 +00:00
|
|
|
* Defines the default error type when using the log() function. Used for
|
2007-02-17 18:38:36 +00:00
|
|
|
* differentiating error logging and debugging. Currently PHP supports LOG_DEBUG.
|
2006-02-18 23:42:21 +00:00
|
|
|
*/
|
2012-05-11 11:31:55 +00:00
|
|
|
define('LOG_ERROR', LOG_ERR);
|
2009-09-10 15:32:21 +00:00
|
|
|
|
2006-02-17 10:12:15 +00:00
|
|
|
/**
|
2010-07-25 22:17:33 +00:00
|
|
|
* Session configuration.
|
2007-04-30 06:01:54 +00:00
|
|
|
*
|
2011-04-17 09:48:51 +00:00
|
|
|
* Contains an array of settings to use for session configuration. The defaults key is
|
2010-07-25 22:17:33 +00:00
|
|
|
* used to define a default preset to use for sessions, any settings declared here will override
|
|
|
|
* the settings of the default config.
|
2007-04-30 06:01:54 +00:00
|
|
|
*
|
2010-07-25 22:17:33 +00:00
|
|
|
* ## Options
|
2007-04-30 06:01:54 +00:00
|
|
|
*
|
2011-08-22 22:36:39 +00:00
|
|
|
* - `Session.cookie` - The name of the cookie to use. Defaults to 'CAKEPHP'
|
2010-07-25 22:17:33 +00:00
|
|
|
* - `Session.timeout` - The number of minutes you want sessions to live for. This timeout is handled by CakePHP
|
|
|
|
* - `Session.cookieTimeout` - The number of minutes you want session cookies to live for.
|
2011-04-17 09:48:51 +00:00
|
|
|
* - `Session.checkAgent` - Do you want the user agent to be checked when starting sessions? You might want to set the
|
2010-11-01 01:56:59 +00:00
|
|
|
* value to false, when dealing with older versions of IE, Chrome Frame or certain web-browsing devices and AJAX
|
2010-07-25 22:17:33 +00:00
|
|
|
* - `Session.defaults` - The default configuration set to use as a basis for your session.
|
|
|
|
* There are four builtins: php, cake, cache, database.
|
2013-02-03 19:00:32 +00:00
|
|
|
* - `Session.handler` - Can be used to enable a custom session handler. Expects an array of of callables,
|
|
|
|
* that can be used with `session_save_handler`. Using this option will automatically add `session.save_handler`
|
2010-07-25 22:17:33 +00:00
|
|
|
* to the ini array.
|
2011-04-17 09:48:51 +00:00
|
|
|
* - `Session.autoRegenerate` - Enabling this setting, turns on automatic renewal of sessions, and
|
2010-07-27 02:42:00 +00:00
|
|
|
* sessionids that change frequently. See CakeSession::$requestCountdown.
|
2010-07-25 22:17:33 +00:00
|
|
|
* - `Session.ini` - An associative array of additional ini values to set.
|
2009-04-15 00:12:44 +00:00
|
|
|
*
|
2010-07-25 22:17:33 +00:00
|
|
|
* The built in defaults are:
|
2009-04-15 00:12:44 +00:00
|
|
|
*
|
2011-08-22 22:36:39 +00:00
|
|
|
* - 'php' - Uses settings defined in your php.ini.
|
2010-07-25 22:17:33 +00:00
|
|
|
* - 'cake' - Saves session files in CakePHP's /tmp directory.
|
|
|
|
* - 'database' - Uses CakePHP's database sessions.
|
|
|
|
* - 'cache' - Use the Cache class to save sessions.
|
2007-04-30 06:01:54 +00:00
|
|
|
*
|
2011-06-20 00:28:40 +00:00
|
|
|
* To define a custom session handler, save it at /app/Model/Datasource/Session/<name>.php.
|
2010-07-25 22:17:33 +00:00
|
|
|
* Make sure the class implements `CakeSessionHandlerInterface` and set Session.handler to <name>
|
2007-04-30 06:01:54 +00:00
|
|
|
*
|
2011-06-20 00:28:40 +00:00
|
|
|
* To use database sessions, run the app/Config/Schema/sessions.php schema using
|
2010-07-25 22:17:33 +00:00
|
|
|
* the cake shell command: cake schema create Sessions
|
2010-05-06 13:35:38 +00:00
|
|
|
*
|
2007-10-17 00:40:47 +00:00
|
|
|
*/
|
2010-07-25 22:17:33 +00:00
|
|
|
Configure::write('Session', array(
|
|
|
|
'defaults' => 'php'
|
|
|
|
));
|
2009-09-10 15:32:21 +00:00
|
|
|
|
2006-01-17 05:13:38 +00:00
|
|
|
/**
|
2007-10-17 00:40:47 +00:00
|
|
|
* A random string used in security hashing methods.
|
2006-01-17 05:13:38 +00:00
|
|
|
*/
|
2009-12-13 15:36:51 +00:00
|
|
|
Configure::write('Security.salt', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');
|
2009-09-10 15:32:21 +00:00
|
|
|
|
2010-01-15 21:56:26 +00:00
|
|
|
/**
|
|
|
|
* A random numeric string (digits only) used to encrypt/decrypt strings.
|
|
|
|
*/
|
2010-01-19 19:53:20 +00:00
|
|
|
Configure::write('Security.cipherSeed', '76859309657453542496749683645');
|
2010-01-15 21:56:26 +00:00
|
|
|
|
2009-11-21 18:26:33 +00:00
|
|
|
/**
|
|
|
|
* Apply timestamps with the last modified time to static assets (js, css, images).
|
2009-11-21 21:25:39 +00:00
|
|
|
* Will append a querystring parameter containing the time the file was modified. This is
|
2009-11-21 18:26:33 +00:00
|
|
|
* useful for invalidating browser caches.
|
|
|
|
*
|
2011-09-01 18:05:17 +00:00
|
|
|
* Set to `true` to apply timestamps when debug > 0. Set to 'force' to always enable
|
|
|
|
* timestamping regardless of debug value.
|
2009-11-21 18:26:33 +00:00
|
|
|
*/
|
|
|
|
//Configure::write('Asset.timestamp', true);
|
2011-12-06 20:52:48 +00:00
|
|
|
|
2005-06-21 16:48:06 +00:00
|
|
|
/**
|
2007-02-17 18:38:36 +00:00
|
|
|
* Compress CSS output by removing comments, whitespace, repeating tags, etc.
|
|
|
|
* This requires a/var/cache directory to be writable by the web server for caching.
|
2007-11-22 17:57:57 +00:00
|
|
|
* and /vendors/csspp/csspp.php
|
2007-04-30 06:01:54 +00:00
|
|
|
*
|
2007-11-22 17:57:57 +00:00
|
|
|
* To use, prefix the CSS link URL with '/ccss/' instead of '/css/' or use HtmlHelper::css().
|
2005-06-21 16:48:06 +00:00
|
|
|
*/
|
2007-12-31 05:19:00 +00:00
|
|
|
//Configure::write('Asset.filter.css', 'css.php');
|
2009-09-10 15:32:21 +00:00
|
|
|
|
2007-12-31 05:19:00 +00:00
|
|
|
/**
|
|
|
|
* Plug in your own custom JavaScript compressor by dropping a script in your webroot to handle the
|
|
|
|
* output, and setting the config below to the name of the script.
|
|
|
|
*
|
|
|
|
* To use, prefix your JavaScript link URLs with '/cjs/' instead of '/js/' or use JavaScriptHelper::link().
|
|
|
|
*/
|
|
|
|
//Configure::write('Asset.filter.js', 'custom_javascript_output_filter.php');
|
2009-09-10 15:32:21 +00:00
|
|
|
|
2005-08-21 06:49:02 +00:00
|
|
|
/**
|
2007-07-31 14:04:18 +00:00
|
|
|
* The classname and database used in CakePHP's
|
2007-02-17 18:38:36 +00:00
|
|
|
* access control lists.
|
2005-08-21 06:49:02 +00:00
|
|
|
*/
|
2008-05-22 02:00:36 +00:00
|
|
|
Configure::write('Acl.classname', 'DbAcl');
|
2007-10-14 01:09:21 +00:00
|
|
|
Configure::write('Acl.database', 'default');
|
2009-09-10 15:32:21 +00:00
|
|
|
|
2009-07-31 15:48:30 +00:00
|
|
|
/**
|
2012-10-15 00:44:31 +00:00
|
|
|
* Uncomment this line and correct your server timezone to fix
|
2011-11-06 19:04:19 +00:00
|
|
|
* any date & time related errors.
|
2009-07-31 15:48:30 +00:00
|
|
|
*/
|
|
|
|
//date_default_timezone_set('UTC');
|
2009-09-10 15:32:21 +00:00
|
|
|
|
2013-02-03 19:00:32 +00:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* Cache Engine Configuration
|
|
|
|
* Default settings provided below
|
|
|
|
*
|
|
|
|
* File storage engine.
|
|
|
|
*
|
|
|
|
* Cache::config('default', array(
|
|
|
|
* 'engine' => 'File', //[required]
|
|
|
|
* 'duration' => 3600, //[optional]
|
|
|
|
* 'probability' => 100, //[optional]
|
|
|
|
* 'path' => CACHE, //[optional] use system tmp directory - remember to use absolute path
|
|
|
|
* 'prefix' => 'cake_', //[optional] prefix every cache file with this string
|
|
|
|
* 'lock' => false, //[optional] use file locking
|
|
|
|
* 'serialize' => true, [optional]
|
|
|
|
* ));
|
|
|
|
*
|
|
|
|
* APC (http://pecl.php.net/package/APC)
|
|
|
|
*
|
|
|
|
* Cache::config('default', array(
|
|
|
|
* 'engine' => 'Apc', //[required]
|
|
|
|
* 'duration' => 3600, //[optional]
|
|
|
|
* 'probability' => 100, //[optional]
|
|
|
|
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
|
|
|
|
* ));
|
|
|
|
*
|
|
|
|
* Xcache (http://xcache.lighttpd.net/)
|
|
|
|
*
|
|
|
|
* Cache::config('default', array(
|
|
|
|
* 'engine' => 'Xcache', //[required]
|
|
|
|
* 'duration' => 3600, //[optional]
|
|
|
|
* 'probability' => 100, //[optional]
|
|
|
|
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
|
|
|
|
* 'user' => 'user', //user from xcache.admin.user settings
|
|
|
|
* 'password' => 'password', //plaintext password (xcache.admin.pass)
|
|
|
|
* ));
|
|
|
|
*
|
|
|
|
* Memcache (http://www.danga.com/memcached/)
|
|
|
|
*
|
|
|
|
* Cache::config('default', array(
|
|
|
|
* 'engine' => 'Memcache', //[required]
|
|
|
|
* 'duration' => 3600, //[optional]
|
|
|
|
* 'probability' => 100, //[optional]
|
|
|
|
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
|
|
|
|
* 'servers' => array(
|
|
|
|
* '127.0.0.1:11211' // localhost, default port 11211
|
|
|
|
* ), //[optional]
|
|
|
|
* 'persistent' => true, // [optional] set this to false for non-persistent connections
|
|
|
|
* 'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory)
|
|
|
|
* ));
|
|
|
|
*
|
|
|
|
* Wincache (http://php.net/wincache)
|
|
|
|
*
|
|
|
|
* Cache::config('default', array(
|
|
|
|
* 'engine' => 'Wincache', //[required]
|
|
|
|
* 'duration' => 3600, //[optional]
|
|
|
|
* 'probability' => 100, //[optional]
|
|
|
|
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
|
|
|
|
* ));
|
|
|
|
*/
|
|
|
|
|
2011-04-17 09:48:51 +00:00
|
|
|
/**
|
2012-07-15 13:11:27 +00:00
|
|
|
* Configure the cache handlers that CakePHP will use for internal
|
|
|
|
* metadata like class maps, and model schema.
|
|
|
|
*
|
|
|
|
* By default File is used, but for improved performance you should use APC.
|
2011-04-17 09:48:51 +00:00
|
|
|
*
|
2012-02-06 20:02:52 +00:00
|
|
|
* Note: 'default' and other application caches should be configured in app/Config/bootstrap.php.
|
2012-10-15 00:44:31 +00:00
|
|
|
* Please check the comments in boostrap.php for more info on the cache engines available
|
2013-02-02 19:17:10 +00:00
|
|
|
* and their settings.
|
2011-04-17 09:48:51 +00:00
|
|
|
*/
|
2011-02-23 16:15:52 +00:00
|
|
|
$engine = 'File';
|
|
|
|
|
|
|
|
// In development mode, caches should expire quickly.
|
|
|
|
$duration = '+999 days';
|
2013-02-03 19:00:32 +00:00
|
|
|
if (Configure::read('debug') > 0) {
|
2011-02-23 16:15:52 +00:00
|
|
|
$duration = '+10 seconds';
|
|
|
|
}
|
|
|
|
|
2012-01-22 23:43:21 +00:00
|
|
|
// Prefix each application on the same server with a different string, to avoid Memcache and APC conflicts.
|
|
|
|
$prefix = 'myapp_';
|
|
|
|
|
2011-02-23 16:15:52 +00:00
|
|
|
/**
|
2013-02-03 19:00:32 +00:00
|
|
|
* Configure the cache used for general framework caching. Path information,
|
2011-02-23 16:15:52 +00:00
|
|
|
* object listings, and translation cache files are stored with this configuration.
|
|
|
|
*/
|
|
|
|
Cache::config('_cake_core_', array(
|
|
|
|
'engine' => $engine,
|
2012-01-22 23:43:21 +00:00
|
|
|
'prefix' => $prefix . 'cake_core_',
|
2011-02-23 16:15:52 +00:00
|
|
|
'path' => CACHE . 'persistent' . DS,
|
|
|
|
'serialize' => ($engine === 'File'),
|
|
|
|
'duration' => $duration
|
|
|
|
));
|
|
|
|
|
|
|
|
/**
|
2013-02-03 19:00:32 +00:00
|
|
|
* Configure the cache for model and datasource caches. This cache configuration
|
2011-02-23 16:15:52 +00:00
|
|
|
* is used to store schema descriptions, and table listings in connections.
|
|
|
|
*/
|
|
|
|
Cache::config('_cake_model_', array(
|
|
|
|
'engine' => $engine,
|
2012-01-22 23:43:21 +00:00
|
|
|
'prefix' => $prefix . 'cake_model_',
|
2011-02-23 16:15:52 +00:00
|
|
|
'path' => CACHE . 'models' . DS,
|
|
|
|
'serialize' => ($engine === 'File'),
|
|
|
|
'duration' => $duration
|
|
|
|
));
|