In case anyone sees this. I've posted this info elsewhere, but the 109 and 403 prefixes come from an MD5 hash of the path to the path/etc folder. If your folder is in different places on different servers (or the same place on different servers that are sharing a cache) you can run into problems.
Since this was EE, I was able to utilize Magento support but I also worked things out on my own to help focus the issue and get a solution as fast as possible. The code changes were provided by Magento so applying them to the actual app/code/core files is fine though you could always duplicate the files in your /app/code/local and apply the changes there.
The issue was that the block caching method that was added in 1.14.2 was not generating a unique cache key so when I had multiple blocks used in the category controller space, the generated cache key ended up being unique only for the first page hit, resulting in all of those pages to show duplicate content.
The fix was to add the following (displayed in diff file format to show the context surrounding the additions - just add in the lines with the + where they need to go):
In app/code/core/Mage/Cms/Block/Block.php at line 72:
}
return $html;
}
+
+ /**
+ * Retrieve values of properties that unambiguously identify unique content
+ *
+ * @return array
+ */
+ public function getCacheKeyInfo()
+ {
+ $blockId = $this->getBlockId();
+ if ($blockId) {
+ $result = array(
+ $blockId,
+ Mage::app()->getStore()->getCode(),
+ );
+ } else {
+ $result = parent::getCacheKeyInfo();
+ }
+ return $result;
+ }
}
In app/code/core/Mage/Cms/Block/Widget/Block.php at line 82:
$helper = Mage::helper('cms');
$processor = $helper->getBlockTemplateProcessor();
$this->setText($processor->filter($block->getContent()));
+ $this->addModelTags($block);
}
}
unset(self::$_widgetUsageMap[$blockHash]);
return $this;
}
+
+ /**
+ * Retrieve values of properties that unambiguously identify unique content
+ *
+ * @return array
+ */
+ public function getCacheKeyInfo()
+ {
+ $result = parent::getCacheKeyInfo();
+ $blockId = $this->getBlockId();
+ if ($blockId) {
+ $result[] = $blockId;
+ }
+ return $result;
+ }
}
I wouldn't think I'd be the only one to see this issue and if it shows up in CE 1.9.2, hopefully this will help resolve it for some people.
Best Answer
This should actually be fixed since 1.7.0.0 according to the Release Notes, but it seems it is not.
I ran into this issue once with product pages using the country of manufacture attribute.
The country dropdown is added in
app/design/frontend/base/default/template/checkout/onepage/billing.phtml
andshipping.phtml
with the<?php echo $this->getCountryHtmlSelect('billing') ?>
and<?php echo $this->getCountryHtmlSelect('shipping') ?>
method.These methods refer to the
getCountryHtmlSelect($type)
method ofMage_Checkout_Block_Onepage_Abstract
where the country options are gathered ingetCountryOptions()
. There you can see, that the cache-id$cacheId = 'DIRECTORY_COUNTRY_SELECT_STORE_' . Mage::app()->getStore()->getCode();
is set.The country of manufacture attribute is loaded via
Mage_Catalog_Model_Product_Attribute_Source_Countryofmanufacture
where in thegetAllOptions()
method the same cache-id$cacheKey = 'DIRECTORY_COUNTRY_SELECT_STORE_' . Mage::app()->getStore()->getCode();
is used.This means: If you load a product page first where the country of manufacture is used, all the country options are available as there is no restriction. Same applies if you refresh the cache.