CodeIgniter Forums
Optimize.php make a problem cached - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6)
+--- Forum: Issues (https://forum.codeigniter.com/forumdisplay.php?fid=19)
+--- Thread: Optimize.php make a problem cached (/showthread.php?tid=90802)



Optimize.php make a problem cached - ALTITUDE_DEV - 05-06-2024

Hello CI Team,
I recently discovered an issue or something to clarify in the CI 4.5.1 documentation. If the options in the Optimize.php file are set to "TRUE," then the changes made in the Email.php file (SMTP server, etc.) are no longer taken into account. Therefore, the factory caches need to be regenerated. Hope this helps Wink


RE: Optimize.php make a problem cached - kenjis - 05-07-2024

It is documented.
If you think that the current explanation is difficult or misleading, feel free to send a PR to improve the documentation.

Quote:Using this feature when the prerequisites are not met will prevent CodeIgniter from operating properly. Do not use this feature in such cases.

To use this feature, the properties of all Config objects instantiated in Factories must not be modified after instantiation. Put another way, the Config classes must be an immutable or readonly classes.

Simply put, all Config instances held by Factories are cached immediately prior to shutdown, and the cached instances are used permanently.

https://codeigniter4.github.io/CodeIgniter4/concepts/factories.html#factories-config-caching



RE: Optimize.php make a problem cached - ALTITUDE_DEV - 05-08-2024

(05-07-2024, 01:04 AM)kenjis Wrote: It is documented.
If you think that the current explanation is difficult or misleading, feel free to send a PR to improve the documentation.

Quote:Using this feature when the prerequisites are not met will prevent CodeIgniter from operating properly. Do not use this feature in such cases.

To use this feature, the properties of all Config objects instantiated in Factories must not be modified after instantiation. Put another way, the Config classes must be an immutable or readonly classes.

Simply put, all Config instances held by Factories are cached immediately prior to shutdown, and the cached instances are used permanently.

https://codeigniter4.github.io/CodeIgniter4/concepts/factories.html#factories-config-caching

Hello, i dont have see this, I think you should put it in an orange hazard square.
Dear Florian


RE: Optimize.php make a problem cached - kenjis - 05-08-2024

I sent a PR to add notes: https://github.com/codeigniter4/CodeIgniter4/pull/8877


RE: Optimize.php make a problem cached - ALTITUDE_DEV - 05-09-2024

(05-08-2024, 07:45 PM)kenjis Wrote: I sent a PR to add notes: https://github.com/codeigniter4/CodeIgniter4/pull/8877

Nice, thanks you <3