Skip to content
This repository
Browse code

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 authored July 15, 2012
9  app/Config/core.php
@@ -232,17 +232,16 @@
232 232
 	//date_default_timezone_set('UTC');
233 233
 
234 234
 /**
235  
- * Pick the caching engine to use.  If APC is enabled use it.
236  
- * If running via cli - apc is disabled by default. ensure it's available and enabled in this case
  235
+ * Configure the cache handlers that CakePHP will use for internal
  236
+ * metadata like class maps, and model schema.
  237
+ *
  238
+ * By default File is used, but for improved performance you should use APC.
237 239
  *
238 240
  * Note: 'default' and other application caches should be configured in app/Config/bootstrap.php.
239 241
  *       Please check the comments in boostrap.php for more info on the cache engines available 
240 242
  *       and their setttings.
241 243
  */
242 244
 $engine = 'File';
243  
-if (extension_loaded('apc') && function_exists('apc_dec') && (php_sapi_name() !== 'cli' || ini_get('apc.enable_cli'))) {
244  
-	$engine = 'Apc';
245  
-}
246 245
 
247 246
 // In development mode, caches should expire quickly.
248 247
 $duration = '+999 days';
12  lib/Cake/Console/Templates/skel/Config/core.php
@@ -293,14 +293,16 @@
293 293
  */
294 294
 
295 295
 /**
296  
- * Pick the caching engine to use.  If APC is enabled use it.
297  
- * If running via cli - apc is disabled by default. ensure it's available and enabled in this case
  296
+ * Configure the cache handlers that CakePHP will use for internal
  297
+ * metadata like class maps, and model schema.
298 298
  *
  299
+ * By default File is used, but for improved performance you should use APC.
  300
+ *
  301
+ * Note: 'default' and other application caches should be configured in app/Config/bootstrap.php.
  302
+ *       Please check the comments in boostrap.php for more info on the cache engines available 
  303
+ *       and their setttings.
299 304
  */
300 305
 $engine = 'File';
301  
-if (extension_loaded('apc') && function_exists('apc_dec') && (php_sapi_name() !== 'cli' || ini_get('apc.enable_cli'))) {
302  
-	$engine = 'Apc';
303  
-}
304 306
 
305 307
 // In development mode, caches should expire quickly.
306 308
 $duration = '+999 days';

0 notes on commit 2f7f5e1

Please sign in to comment.
Something went wrong with that request. Please try again.