0
echo $this->getLayout()->createBlock('mpanel/products')
    ->setProductsCount($this->getProductsCount())
    ->setCountPerRow($this->getCountPerRow())
    ->setLoadMore($this->getLoadMore())
    ->setTemplate('mgs/mpanel/products/grid/featured_products.phtml')
    ->toHtml(); 

How I can disable cache for the above block call.

0

You can use the below code.

<reference name="Your_Block">
    <action method="setCacheLifetime"><s>null</s></action>
</reference>
0

Try below code

setCacheLifeTime to null and then your block will not be cache

echo $this->getLayout()->createBlock('mpanel/products')
    ->setCacheLifetime('null') //setCacheLifeTime to 0
    ->setProductsCount($this->getProductsCount())
    ->setCountPerRow($this->getCountPerRow())
    ->setLoadMore($this->getLoadMore())
    ->setTemplate('mgs/mpanel/products/grid/featured_products.phtml')
    ->toHtml(); 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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