Skip to content

Commit

Permalink
Merge pull request #8877 from kenjis/docs-config-caching-add-notes
Browse files Browse the repository at this point in the history
docs: add notes for Config Caching
  • Loading branch information
kenjis authored May 10, 2024
2 parents 6cb01b1 + c6c370d commit f03602f
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 f03602f

Please sign in to comment.