AD0-E716 practice question 14 of 15
An Adobe Commerce developer is tasked with creating a custom block that will be displayed on every page in the footer of the site. After completing…
Full set: 69 questionsTo store a block in the system cache, the developer needs to set values for both the cache_lifetime and cache_key data properties of the block. The cache_lifetime property specifies how long the block should be cached, and the cache_key property specifies a unique identifier for the block. The following code shows how to set the cache_lifetime and cache_key data properties of a block: PHP
$block->setData('cache_lifetime', 600);
$block->setData('cache_key', 'my_custom_block');
Once the cache_lifetime and cache_key data properties have been set, the block will be stored in the system cache and will not be regenerated on each page load.
Keep practicing
Take the free AD0-E716 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other AD0-E716 practice questions
- Question 1An Adobe Commerce developer is being tasked with creating a new cron job to run a method …
- Question 3A message queue currently has queue/consumer-wait-for-messages set to true, which allows …
- Question 4An Adobe Commerce Cloud developer wants to be sure that, even after transferring database…
- Question 5What are two features with Adobe Commerce Cloud that come out of the box? (Choose Two.)
- Question 7An international merchant is complaining that changes are taking too long to be reflected…
- Question 8A developer is working on an Adobe Commerce Cloud project and wants to get connection dat…
