How would the developer resolve this?

An Adobe Commerce Developer has created a new custom block extending MagentoFrameworkviewElementAbstractBlock and has set the cache_lifetime data property for the block so that the output gets cached.

The block is inserted into the sidebar, and displays differing content depending on which currency is being used. The developer finds that the block is displaying the same content for all currencies, depending on which currency is viewed first after the cache has been flushed.

How would the developer resolve this?
A . Implement the MagentoFrameworkDataObjectldentityinterface class, as well as a getldentities() method, returning the current currency code.
B . Override the getCacheKeyinfo() function adding the current currency code to the returned array.
C . In the constructor, add the current currency code as a cache tag using $thismetaDataCcache_tags’’, CURRENCY_CODE ]) .

Answer: B

Latest AD0-E709 Dumps Valid Version with 135 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments