I manage multiple sites with CakePHP.
I want to set the Cache engine settings for each site.
Is it possible to overwrite the Cache settings in config/app.php with another file?
Thank you very much.
The contents I want to change are as follows.
What I tried
'Cache' =>[ 'short' =>[ 'className' =>xxxx, 'duration' =>xxx, ...abridgement ],, ]
At the bottom of bootstrap.php, we load the configuration files for each site and configure the Cache engine.
When I checked the cache settings with Configure :: read, the settings were overwritten as expected.
However, the cache is actually created by the setting of app.php.
* The content of the app is set in the same way, but the content is reflected normally.
//bootstrap.php Configure :: load ("configuration file for each site," default ", false);
Supplementary information (FW/tool version, etc.)
// Configuration file for each site return [ 'Cache' =>[ 'short' =>[ 'className' =>Override value, 'duration' =>Override value, ...abridgement ],, ] ]
Answer # 1
Was self resolved.
I solved it by executing the cache setting execution in bootstrap.php after loading the site configuration file.
// Load site configuration file Configure :: load ("configuration file for each site", "default", false); // Execute cache settings after reading the configuration file Cache :: setConfig (Configure :: consume ('Cache'));
- php - permalink settings don't work when i have a hierarchy in my custom taxonomy
- i want to create multiple approvals for cakephp4 authentication plugins
- apache settings about submitting php forms
- how to set front-pagephp as a fixed page of display settings when using your own theme with wordpress
- $this-> request not available in cakephp4 helper
- how to bind array values in cakephp4
- the shape of the data in the dataset in cakephp4? i want to change the data type
- php artisan route: cache results in error
- php - about apache virtual host settings
- cakephp4 table naming convention
- i want to make my php template engine compact
- about cache settings in htaccess
- php - i'm doing db settings
- python - you may need to restart the kernel to use updated packages error
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- python 3x - typeerror: 'method' object is not subscriptable
- i want to call a child component method from a parent in vuejs
- dart - flutter: the instance member'stars' can't be accessed in an initializer error
- xcode - pod install [!] no `podfile 'found in the project directory