Skip to content

Commit 63185ab

Browse files
committed
mention spark optimize restrictions for worker mode
1 parent 41f49bd commit 63185ab

File tree

4 files changed

+7
-25
lines changed

4 files changed

+7
-25
lines changed

app/Config/Optimize.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
*
88
* NOTE: This class does not extend BaseConfig for performance reasons.
99
* So you cannot replace the property values with Environment Variables.
10+
*
11+
* WARNING: Do not use these options when running the app in the Worker Mode.
1012
*/
1113
class Optimize
1214
{

user_guide_src/source/concepts/autoloader.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,3 +212,5 @@ Or you can enable it with the ``spark optimize`` command.
212212
.. note::
213213
This property cannot be overridden by
214214
:ref:`environment variables <configuration-classes-and-environment-variables>`.
215+
216+
.. warning:: Do not use this option when running the app in the :doc:`Worker Mode </installation/worker_mode>`.

user_guide_src/source/concepts/factories.rst

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -340,28 +340,4 @@ Or you can enable this with the ``spark optimize`` command.
340340
This property cannot be overridden by
341341
:ref:`environment variables <configuration-classes-and-environment-variables>`.
342342

343-
.. note::
344-
In v4.4.x, uncomment the following code in **public/index.php**::
345-
346-
--- a/public/index.php
347-
+++ b/public/index.php
348-
@@ -49,8 +49,8 @@ if (! defined('ENVIRONMENT')) {
349-
}
350-
351-
// Load Config Cache
352-
-// $factoriesCache = new \CodeIgniter\Cache\FactoriesCache();
353-
-// $factoriesCache->load('config');
354-
+$factoriesCache = new \CodeIgniter\Cache\FactoriesCache();
355-
+$factoriesCache->load('config');
356-
// ^^^ Uncomment these lines if you want to use Config Caching.
357-
358-
/*
359-
@@ -79,7 +79,7 @@ $app->setContext($context);
360-
$app->run();
361-
362-
// Save Config Cache
363-
-// $factoriesCache->save('config');
364-
+$factoriesCache->save('config');
365-
// ^^^ Uncomment this line if you want to use Config Caching.
366-
367-
// Exits the application, setting the exit code for CLI-based applications
343+
.. warning:: Do not use this option when running the app in the :doc:`Worker Mode </installation/worker_mode>`.

user_guide_src/source/installation/deployment.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ The ``spark optimize`` command performs the following optimizations:
2828
- Enabling `Config Caching`_
2929
- Enabling `FileLocator Caching`_
3030

31+
.. warning:: Do not use ``spark optimize`` when running the app in the :doc:`worker_mode`.
32+
3133
Composer Optimization
3234
=====================
3335

0 commit comments

Comments
 (0)