Skip to content

Commit

Permalink
docs: add notes for Config Caching
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed May 9, 2024
1 parent 6cb01b1 commit c6c370d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions user_guide_src/source/concepts/factories.rst
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,10 @@ Config Caching

.. versionadded:: 4.4.0

.. important:: Do not use this feature unless you have carefully read this section
and understand how this feature works. Otherwise, your application will not
function properly.

To improve performance, Config Caching has been implemented.

Prerequisite
Expand All @@ -287,6 +291,9 @@ Prerequisite
How It Works
============

.. important:: Once cached, configuration values are never changed until the cache
is deleted, even if the configuration file or **.env** is changed.

- Save the all Config instances in Factories into a cache file before shutdown,
if the state of the Config instances in Factories changes.
- Restore cached Config instances before CodeIgniter initialization if a cache
Expand Down
3 changes: 3 additions & 0 deletions user_guide_src/source/installation/deployment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ See :ref:`modules-specify-composer-packages`.
Config Caching
==============

.. important:: Once cached, configuration values are never changed until the cache
is deleted, even if the configuration file or **.env** is changed.

Caching the Config objects can improve performance. However, the cache must be
manually deleted when changing Config values.

Expand Down

0 comments on commit c6c370d

Please sign in to comment.