@@ -316,27 +316,34 @@ Or simply delete the **writable/cache/FactoriesCache_config** file.
316
316
How to Enable Config Caching
317
317
============================
318
318
319
- Uncomment the following code in **public/index.php **::
320
-
321
- --- a/public/index.php
322
- +++ b/public/index.php
323
- @@ -49,8 +49,8 @@ if (! defined('ENVIRONMENT')) {
324
- }
325
-
326
- // Load Config Cache
327
- -// $factoriesCache = new \CodeIgniter\Cache\FactoriesCache();
328
- -// $factoriesCache->load('config');
329
- +$factoriesCache = new \CodeIgniter\Cache\FactoriesCache();
330
- +$factoriesCache->load('config');
331
- // ^^^ Uncomment these lines if you want to use Config Caching.
332
-
333
- /*
334
- @@ -79,7 +79,7 @@ $app->setContext($context);
335
- $app->run();
336
-
337
- // Save Config Cache
338
- -// $factoriesCache->save('config');
339
- +$factoriesCache->save('config');
340
- // ^^^ Uncomment this line if you want to use Config Caching.
341
-
342
- // Exits the application, setting the exit code for CLI-based applications
319
+ .. versionadded :: 4.5.0
320
+
321
+ Set the following property to ``true `` in **app/Config/Cache.php **::
322
+
323
+ public bool $configCacheEnabled = true;
324
+
325
+ .. note ::
326
+ Prior to v4.5.0, uncomment the following code in **public/index.php **::
327
+
328
+ --- a/public/index.php
329
+ +++ b/public/index.php
330
+ @@ -49,8 +49,8 @@ if (! defined('ENVIRONMENT')) {
331
+ }
332
+
333
+ // Load Config Cache
334
+ -// $factoriesCache = new \CodeIgniter\Cache\FactoriesCache();
335
+ -// $factoriesCache->load('config');
336
+ +$factoriesCache = new \CodeIgniter\Cache\FactoriesCache();
337
+ +$factoriesCache->load('config');
338
+ // ^^^ Uncomment these lines if you want to use Config Caching.
339
+
340
+ /*
341
+ @@ -79,7 +79,7 @@ $app->setContext($context);
342
+ $app->run();
343
+
344
+ // Save Config Cache
345
+ -// $factoriesCache->save('config');
346
+ +$factoriesCache->save('config');
347
+ // ^^^ Uncomment this line if you want to use Config Caching.
348
+
349
+ // Exits the application, setting the exit code for CLI-based applications
0 commit comments