I have dynamic content in my block which is cached so I exclude this block from cache in the easiest way. I've created cache.xml which looks like:

<?xml version="1.0" encoding="UTF-8"?>

and i've created container:

class My_Package_Model_Container_Category_View extends
           const PREFIX = 'MY_CATEGORY_VIEW';

and it works great. the block is excluded from FPC, but the problem is that after refreshing the page I've got exception.

Fatal error: Call to a member function getChild() on a non-object

in this line:


any idea how to fix that? I've spent 2 days on it and still cannot resolve it.

  • Good luck, would love to know your solution or anyone else who can help answer.
    – camdixon
    Nov 25, 2016 at 14:24

1 Answer 1


I resolved this problem this way. I created the observer which exclude category view from FPC. It's not the best way because I needed only to exclude one block from this view but it works...

My observer:

class MyCompany_Catalog_Model_Observer
    public function processPreDispatch(Varien_Event_Observer $observer) {
        $action = $observer->getEvent()->getControllerAction();

        if ($action->getFullActionName() === 'catalog_category_view') {
            $cache = Mage::app()->getCacheInstance();         

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.