QuestionQ46

VerifiedCloud Setup/Config

A developer is creating the class \Vendor\Module\Model\MyModel.

How should this class be configured as transient in di.xml?

Explanation

In Adobe Commerce and Magento Open Source, a transient object is created anew for every request. Object lifestyle is configured with the shared property on a type node; setting shared="false" makes the type non-shared (transient).

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!