How to use separat block caches for secure and unsecure shop access in Magento?
Posted
by Uwe Mesecke
on Stack Overflow
See other posts from Stack Overflow
or by Uwe Mesecke
Published on 2010-05-07T16:34:49Z
Indexed on
2010/05/07
16:38 UTC
Read the original article
Hit count: 190
magento
I use the Magento block cache for the top navigation block. The problem is the block has to generate some urls for files in the skin directory that cannot be put into css files as the file names depend on category model data.
Now when I open magento using a secure connection (https://) the navigation block is fetched from the cache and is sent to the browser but with the http:// urls resulting in a warning in most browsers about unsecure elements on the page.
I'd like the have separat caches for secure and unsecure connections. The navigation block extends the class Mage_Catalog_Block_Navigation
and therefore has the following cache configuration:
$this->addData(array(
'cache_lifetime' => false,
'cache_tags' => array(Mage_Catalog_Model_Category::CACHE_TAG, Mage_Core_Model_Store_Group::CACHE_TAG),
));
© Stack Overflow or respective owner