Our headers caching over one another. A solution that i've come up with involves creating and calling these separate cached pages from a non-cached environment. Seems like it'd be a successful endeavor. What is the best way to acomplish this goal?

Is it possible to create a cache key for a block?

1 Answer 1


Yes you can cache each of the block in accordance with your need. There are lot of tutorials regarding about this topic. Some of the Best resources available are listing below.

Basically in your block's __construct, you need to setup block cache somewhat liket this.

class {NS}_{Module}_Block_{View} extends Mage_Core_Block_Template 

    protected function _construct()
            'cache_lifetime'    => 120,
            'cache_tags'        => array(Mage_Catalog_Model_Product::CACHE_TAG),
            'cache_key'         => $this->getProduct()->getId(),


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.