1

Example: We have a Full Page Cached Category Page, How System Know Weather To Send Cached Data as a Response, Or Hit Database and Send response. If it uses any cache tag, where does it check?

1 Answer 1

0

Almost all of the block classes extend to the class

\Magento\Framework\View\Element\Template 

which also extends to the abstract class

\Magento\Framework\View\Element\AbstractBlock

and with fpp activated the block html is always loaded from cache. In the abstrtact class, have a look on the toHtml() and _loadCache() functions, where the check and the load is happening. If you add in your block class the following function then the block html is not loaded from cache.

public function getCacheLifetime()
{
    return null;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.