Skip to content

Commit ff466a5

Browse files
committed
Merge branch '4.4' into 5.1
* 4.4: Reword wrong sentence
2 parents def20b4 + 151b9c3 commit ff466a5

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

performance.rst

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,24 +109,22 @@ Starting from PHP 7.4, OPcache can compile and load classes at start-up and
109109
make them available to all requests until the server is restarted, improving
110110
performance significantly.
111111

112-
During container compilation, Symfony generates the file with the list of
113-
classes to preload. The only requirement is that you need to set both
114-
``container.dumper.inline_factories`` and ``container.dumper.inline_class_loader``
115-
parameters to ``true``.
112+
During container compilation (e.g. when running the ``cache:clear`` command),
113+
Symfony generates a file called ``.preload`` (with a leading ``.``) in the
114+
``src/`` directory with the list of classes to preload.
116115

117-
The preload file path is the same as the compiled service container but with the
118-
``preload`` suffix:
116+
The only requirement is that you need to set both ``container.dumper.inline_factories``
117+
and ``container.dumper.inline_class_loader`` parameters to ``true``. Then, you
118+
can configure PHP to use this preload file:
119119

120120
.. code-block:: ini
121121
122122
; php.ini
123123
opcache.preload=/path/to/project/src/.preload.php
124124
125-
This file is generated by the ``cache:clear`` command.
126-
127125
Use the :ref:`container.preload <dic-tags-container-preload>` and
128126
:ref:`container.no_preload <dic-tags-container-nopreload>` service tags to define
129-
which classes should or should not be preloaded PHP.
127+
which classes should or should not be preloaded by PHP.
130128

131129
.. _performance-configure-opcache:
132130

0 commit comments

Comments
 (0)