To prepare for the certification exam, the candidate should know about different cache types and their purpose. The cache is an important and crucial part of the website's performance. One of the caches is the "EAV types and attributes" cache.
You can check the list of caches in Magento Admin and by using console commands. Below is the screenshot of the list of caches in admin under System -> Cache Management
As of version 2.3.4, Commerce caches all system EAV attributes as they are retrieved. Caching EAV attributes in this manner improves performance, because it decreases the amount of insert/select requests to the DB. However, it increases cache network size as well.
Developers can cache custom EAV attributes by running the below command.
bin/magento config:set dev/caching/cache_user_defined_attributes 1
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.
NOTE: This is one of the questions asked multiple times in the Magento Certification. Questions can be asked in multiple ways:
Question: "How can a developer enable caching for custom EAV attributes for improved performance, if required?"
Answer: "By enabling the cache user-defined attributes configuration in Admin settings"
Comments
Post a Comment