Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
465 additions
and
481 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
namespace App\Config; | ||
|
||
use Cake\Core\Configure; | ||
|
||
/** | ||
* CakePHP Debug Level: | ||
* | ||
* Production Mode: | ||
* 0: No error messages, errors, or warnings shown. Flash messages redirect. | ||
* | ||
* 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. | ||
* | ||
* In production mode, flash messages redirect after a time interval. | ||
* In development mode, you need to click the flash message to continue. | ||
*/ | ||
Configure::write('debug', 2); | ||
|
||
/** | ||
* Configure basic information about the application. | ||
* | ||
* - namespace - The namespace to find app classes under. | ||
* - encoding - The encoding used for HTML + database connections. | ||
* - baseUrl - To configure CakePHP *not* to use mod_rewrite and to | ||
* use CakePHP pretty URLs, remove these .htaccess | ||
* files: | ||
* /.htaccess | ||
* /app/.htaccess | ||
* /app/webroot/.htaccess | ||
* And uncomment the baseUrl key below. | ||
* - base - The base directory the app resides in. If false this | ||
* will be auto detected. | ||
* - webroot - The webroot directory. | ||
* - www_root - The file path to webroot. | ||
*/ | ||
Configure::write('App', array( | ||
'namespace' => 'App', | ||
'encoding' => 'UTF-8', | ||
'baseUrl' => false, | ||
//'baseUrl' => env('SCRIPT_NAME'), | ||
'base' => false, | ||
'dir' => APP_DIR, | ||
'webroot' => WEBROOT_DIR, | ||
'www_root' => WWW_ROOT, | ||
)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
<?php | ||
/** | ||
* 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 | ||
* | ||
* 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. | ||
*/ | ||
namespace App\Config; | ||
|
||
use Cake\Core\Configure; | ||
use Cake\Cache\Cache; | ||
|
||
// In development mode, caches should expire quickly. | ||
$duration = '+999 days'; | ||
if (Configure::read('debug') >= 1) { | ||
$duration = '+10 seconds'; | ||
} | ||
|
||
/** | ||
* Engine used for core cache configurations. | ||
* For improved performance APC, Redis, or Memcache should be used. | ||
*/ | ||
$engine = 'File'; | ||
|
||
// Prefix each application on the same server with a different string, to avoid Memcache and APC conflicts. | ||
$prefix = 'myapp_'; | ||
|
||
/** | ||
* 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' => $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 | ||
)); | ||
|
||
/** | ||
* 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] | ||
* 'mask' => 0666, // [optional] permission mask to use when creating cache files | ||
* )); | ||
* | ||
* 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://memcached.org/) | ||
* | ||
* 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 | ||
* )); | ||
* | ||
* Redis (http://http://redis.io/) | ||
* | ||
* Cache::config('default', array( | ||
* 'engine' => 'Redis', //[required] | ||
* 'duration'=> 3600, //[optional] | ||
* 'probability'=> 100, //[optional] | ||
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string | ||
* 'server' => '127.0.0.1' // localhost | ||
* 'port' => 6379 // default port 6379 | ||
* 'timeout' => 0 // timeout in seconds, 0 = unlimited | ||
* 'persistent' => true, // [optional] set this to false for non-persistent connections | ||
* )); | ||
*/ | ||
Cache::config('default', array('engine' => 'File')); |
Oops, something went wrong.