Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use file cache as the default cache engine.

Too many people had issues using APC by default as its often configured
in strange ways, and works poorly on inexpensive hosting.

Fixes #2995
  • Loading branch information...
commit 2f7f5e13224537eaa4da6b825b1d106bebc35d05 1 parent 69eba67
Mark Story markstory authored
9 app/Config/core.php
View
@@ -232,17 +232,16 @@
//date_default_timezone_set('UTC');
/**
- * Pick the caching engine to use. If APC is enabled use it.
- * If running via cli - apc is disabled by default. ensure it's available and enabled in this case
+ * 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.
*
* Note: 'default' and other application caches should be configured in app/Config/bootstrap.php.
* Please check the comments in boostrap.php for more info on the cache engines available
* and their setttings.
*/
$engine = 'File';
-if (extension_loaded('apc') && function_exists('apc_dec') && (php_sapi_name() !== 'cli' || ini_get('apc.enable_cli'))) {
- $engine = 'Apc';
-}
// In development mode, caches should expire quickly.
$duration = '+999 days';
12 lib/Cake/Console/Templates/skel/Config/core.php
View
@@ -293,14 +293,16 @@
*/
/**
- * Pick the caching engine to use. If APC is enabled use it.
- * If running via cli - apc is disabled by default. ensure it's available and enabled in this case
+ * 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.
+ *
+ * Note: 'default' and other application caches should be configured in app/Config/bootstrap.php.
+ * Please check the comments in boostrap.php for more info on the cache engines available
+ * and their setttings.
*/
$engine = 'File';
-if (extension_loaded('apc') && function_exists('apc_dec') && (php_sapi_name() !== 'cli' || ini_get('apc.enable_cli'))) {
- $engine = 'Apc';
-}
// In development mode, caches should expire quickly.
$duration = '+999 days';
Please sign in to comment.
Something went wrong with that request. Please try again.