Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6b3a427

Browse filesBrowse files
committed
Deprecated cache:clear with warmup
1 parent 1dd8b5d commit 6b3a427
Copy full SHA for 6b3a427

File tree

Expand file treeCollapse file tree

4 files changed

+19
-15
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+19
-15
lines changed

‎configuration/override_dir_structure.rst

Copy file name to clipboardExpand all lines: configuration/override_dir_structure.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ You also need to change the ``extra.symfony-web-dir`` option in the
168168

169169
.. code-block:: terminal
170170
171-
$ php bin/console cache:clear --env=prod
171+
$ php bin/console cache:clear --no-warmup --env=prod
172172
$ php bin/console assetic:dump --env=prod --no-debug
173173
174174
Override the ``vendor`` Directory

‎console/usage.rst

Copy file name to clipboardExpand all lines: console/usage.rst
+9-12Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,19 @@ The :doc:`/components/console/usage` page of the components documentation looks
88
at the global console options. When you use the console as part of the full-stack
99
framework, some additional global options are available as well.
1010

11-
By default, console commands run in the ``dev`` environment and you may want
12-
to change this for some commands. For example, you may want to run some commands
13-
in the ``prod`` environment for performance reasons. Also, the result of some commands
14-
will be different depending on the environment. For example, the ``cache:clear``
15-
command will clear and warm the cache for the specified environment only. To
16-
clear and warm the ``prod`` cache you need to run:
11+
By default, console commands run in the ``dev`` environment and you may want to
12+
change this for some commands. For example, you may want to run some commands in
13+
the ``prod`` environment for performance reasons. Also, the result of some
14+
commands will be different depending on the environment. For example, the
15+
``cache:clear`` command will clear the cache for the specified environment only.
16+
To clear the ``prod`` cache you need to run:
1717

1818
.. code-block:: terminal
1919
20-
$ php bin/console cache:clear --env=prod
20+
$ php bin/console cache:clear --no-warmup --env=prod
2121
22-
or the equivalent:
23-
24-
.. code-block:: terminal
25-
26-
$ php bin/console cache:clear -e prod
22+
# this is equivalent:
23+
$ php bin/console cache:clear --no-warmup -e prod
2724
2825
In addition to changing the environment, you can also choose to disable debug mode.
2926
This can be useful where you want to run commands in the ``dev`` environment

‎deployment.rst

Copy file name to clipboardExpand all lines: deployment.rst
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,12 @@ as you normally do:
153153
D) Clear your Symfony Cache
154154
~~~~~~~~~~~~~~~~~~~~~~~~~~~
155155

156-
Make sure you clear (and warm-up) your Symfony cache:
156+
Make sure you clear and warm-up your Symfony cache:
157157

158158
.. code-block:: terminal
159159
160-
$ php bin/console cache:clear --env=prod --no-debug
160+
$ php bin/console cache:clear --env=prod --no-debug --no-warmup
161+
$ php bin/console cache:warmup --env=prod
161162
162163
E) Dump your Assetic Assets
163164
~~~~~~~~~~~~~~~~~~~~~~~~~~~

‎reference/dic_tags.rst

Copy file name to clipboardExpand all lines: reference/dic_tags.rst
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,12 @@ process
504504
Cache warming occurs whenever you run the ``cache:warmup`` or ``cache:clear``
505505
command (unless you pass ``--no-warmup`` to ``cache:clear``). It is also run
506506
when handling the request, if it wasn't done by one of the commands yet.
507+
508+
.. versionadded:: 3.3
509+
Starting from Symfony 3.3, the warm-up part of the ``cache:clear`` command
510+
is deprecated. You must always pass the ``--no-warmup`` option to
511+
``cache:clear`` and use ``cache:warmup`` instead to warm-up the cache.
512+
507513
The purpose is to initialize any cache that will be needed by the application
508514
and prevent the first user from any significant "cache hit" where the cache
509515
is generated dynamically.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.