下面是一个创建该文件名路径的代码,在Mage_Catalog_Model_Product_Image
发现:
// build new filename (most important params)
$path = array(
Mage::getSingleton('catalog/product_media_config')->getBaseMediaPath(),
'cache',
Mage::app()->getStore()->getId(),
$path[] = $this->getDestinationSubdir()
);
if((!empty($this->_width)) || (!empty($this->_height)))
$path[] = "{$this->_width}x{$this->_height}";
// add misk params as a hash
$miscParams = array(
($this->_keepAspectRatio ? '' : 'non') . 'proportional',
($this->_keepFrame ? '' : 'no') . 'frame',
($this->_keepTransparency ? '' : 'no') . 'transparency',
($this->_constrainOnly ? 'do' : 'not') . 'constrainonly',
$this->_rgbToString($this->_backgroundColor),
'angle' . $this->_angle,
'quality' . $this->_quality
);
// if has watermark add watermark params to hash
if ($this->getWatermarkFile()) {
$miscParams[] = $this->getWatermarkFile();
$miscParams[] = $this->getWatermarkImageOpacity();
$miscParams[] = $this->getWatermarkPosition();
$miscParams[] = $this->getWatermarkWidth();
$miscParams[] = $this->getWatermarkHeigth();
}
$path[] = md5(implode('_', $miscParams));
// append prepared filename
$this->_newFile = implode('/', $path) . $file; // the $file contains heading slash
所以,哈希是从配置信息(宽高比等)以及水印信息生成的。这些信息通常不会改变。但是,我确实看到该路径部分来自当前商店的store_id
,所以您的麻烦可能在那里。
有没有理由让Magento在两家商店中都使用正常的缓存过程?由于Magento检查文件系统的缓存图像,应该不会有冲突。
希望有帮助!
谢谢, 乔
在沉思,你只是想获得目录图像在这两个领域的工作?目录图像的非缓存版本为%magento%/media/catalog/product
。从该位置复制目录,并且您的目录图像应该可以工作。
谢谢乔。 我试图复制只是目录/产品/图像,仍然没有喜悦,然后我试图删除缓存的图像,再次,没有喜悦。结果 - 仍然快乐,仍然卡住试图让图像在4天后加载! – 2010-05-27 08:53:03
两个安装都有相同的store_id – 2010-05-27 11:59:18