Enable or disable cache types
This command enables you to enable or disable all cache types or only the ones you specify. Disabling cache types is useful during development because you see the results of your changes without having to flush the cache; however, disabling cache types has an adverse effect on performance.
<magento_root>/app/etc/env.php
writeable by the file system owner.You can clean (also referred to as flush or refresh) cache types using either the command line or the Admin.
Command options:
Where omitting [type]
enables or disables all cache types at the same time. The type
option is a space-separated list of cache types.
To list cache types and their status:
For example, to disable the full page cache and the DDL cache:
Sample result:
bin/magento config:set dev/caching/cache_user_defined_attributes 1
command. This can also be done from the Admin while in Developer mode by setting Stores > Settings Configuration > Advanced > Developer > Caching Settings > Cache User Defined Attributes to Yes.Clean and flush cache types
To purge out-of-date items from the cache, you can clean or flush cache types:
-
Cleaning a cache type deletes all items from enabled Commerce cache types only. In other words, this option does not affect other processes or applications because it cleans only the cache that Commerce uses.
Disabled cache types are not cleaned.
TIP
Always clean the cache after upgrading versions of Adobe Commerce, upgrading from Magento Open Source to Adobe Commerce, or installing B2B for Adobe Commerce or any module. -
Flushing a cache type purges the cache storage, which might affect other processes applications that are using the same storage.
Flush cache types if you have already tried cleaning the cache and you are still having issues that you cannot isolate.
Command usage:
Where [type]
is a space-separated list of cache types. Omitting [type]
cleans or flushes all cache types at the same time. For example, to flush all cache types, enter
Sample result:
bin/magento cache:flush
. Flush Magento Cache is equivalent to bin/magento cache:clean
.More help on this topic
B2B Reimagined: Transforming Go-to-Market Strategies for Profitable Growth
B2B brands are facing a digital revolution. Buyers expect hyper-relevant content and self-service, while internally AI is transforming...
Wed, Mar 19, 1:00 PM PDT (8:00 PM UTC)
How AI Is Transforming the Commerce Landscape
Delve into how AI is revolutionizing the commerce landscape by optimizing operations, enhancing customer experiences, and improving...
Tue, Mar 18, 3:30 PM PDT (10:30 PM UTC)
Connect with Experience League at Summit!
Get front-row access to top sessions, hands-on activities, and networking—wherever you are!
Learn more