@@ -41,20 +41,20 @@ efficient cache management. The main cache types in Magento 2 are:
41
41
Magento 2 provides a command-line tool, ` bin/magento ` , to enable or disable different cache types. To enable all cache
42
42
types, use the following command:
43
43
44
- ```
44
+ ``` bash
45
45
bin/magento cache:enable
46
46
```
47
47
48
48
To enable specific cache types, use the ` --type ` option followed by the cache type code. For example, to enable only the
49
49
page cache and block HTML output cache, use:
50
50
51
- ```
51
+ ``` bash
52
52
bin/magento cache:enable page_cache block_html
53
53
```
54
54
55
55
Similarly, to disable all cache types, use the following command:
56
56
57
- ```
57
+ ``` bash
58
58
bin/magento cache:disable
59
59
```
60
60
@@ -63,14 +63,14 @@ bin/magento cache:disable
63
63
Flushing the cache clears all stored cache data, forcing Magento to recompute and regenerate the cache on the next
64
64
request. To flush all cache types, run the following command:
65
65
66
- ```
66
+ ``` bash
67
67
bin/magento cache:flush
68
68
```
69
69
70
70
To flush specific cache types, use the ` --type ` option followed by the cache type code. For example, to flush only the
71
71
page cache and block HTML output cache, use:
72
72
73
- ```
73
+ ``` bash
74
74
bin/magento cache:flush page_cache block_html
75
75
```
76
76
@@ -163,7 +163,7 @@ merging XML files on each request.
163
163
164
164
Example: To enable Configuration Cache in Magento 2 via the command line, use the following command:
165
165
166
- ```
166
+ ``` bash
167
167
php bin/magento cache:enable config
168
168
```
169
169
@@ -174,7 +174,7 @@ merging XML files on each request, leading to improved performance.
174
174
175
175
Example: To enable Layout Cache in Magento 2 via the command line, use the following command:
176
176
177
- ```
177
+ ``` bash
178
178
php bin/magento cache:enable layout
179
179
```
180
180
@@ -225,7 +225,7 @@ metadata, Magento avoids querying the database for metadata information repeated
225
225
226
226
Example: To enable Metadata Cache in Magento 2 via the command line, use the following command:
227
227
228
- ```
228
+ ``` bash
229
229
php bin/magento cache:enable metadata
230
230
```
231
231
@@ -245,7 +245,7 @@ is useful, especially when automating deployment processes or managing multiple
245
245
246
246
Example: To enable the Full Page Cache via the command line, use the following command:
247
247
248
- ```
248
+ ``` bash
249
249
php bin/magento cache:enable full_page
250
250
```
251
251
@@ -267,7 +267,7 @@ Magento 2 provides cache management commands that allow you to flush specific ca
267
267
268
268
Example: To flush the Object Cache via the command line, use the following command:
269
269
270
- ```
270
+ ``` bash
271
271
php bin/magento cache:flush customer
272
272
```
273
273
0 commit comments