Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
litespeed_wiki:cache:litemage:troubleshooting:exclude-price-block-from-login-user [2017/12/18 19:00] Jackson Zhang |
litespeed_wiki:cache:litemage:troubleshooting:exclude-price-block-from-login-user [2017/12/18 19:20] Jackson Zhang |
||
---|---|---|---|
Line 34: | Line 34: | ||
The final code looks like: | The final code looks like: | ||
- | if ($diffGrp = $this->_config->getConf(Litespeed_Litemage_Helper_Data::CFG_DIFFCUSTGRP)) { | + | protected function _getDefaultEnvCookieValue() |
+ | { | ||
+ | ... | ||
+ | ... | ||
+ | if ($diffGrp = $this->_config->getConf(Litespeed_Litemage_Helper_Data::CFG_DIFFCUSTGRP)) { | ||
// diff cache copy per customer group | // diff cache copy per customer group | ||
$currCustomerGroup = Mage::getSingleton('customer/session')->getCustomerGroupId() ; | $currCustomerGroup = Mage::getSingleton('customer/session')->getCustomerGroupId() ; | ||
Line 51: | Line 55: | ||
$this->_cacheVars['flag'] |= self::CHBM_PRIVATE; | $this->_cacheVars['flag'] |= self::CHBM_PRIVATE; | ||
// $this->setNotCacheable(); | // $this->setNotCacheable(); | ||
- | |||
} | } | ||
/* end of customized code change */ | /* end of customized code change */ | ||
} | } | ||
} | } | ||
+ | ... | ||
+ | ... | ||
+ | } | ||
So for the logged-in user with group 1 and store 1, it will be served from private cache and private ESI blocks. The rest users will be served from public cache with private ESI blocks. | So for the logged-in user with group 1 and store 1, it will be served from private cache and private ESI blocks. The rest users will be served from public cache with private ESI blocks. | ||
Line 68: | Line 73: | ||
{{ :litespeed_wiki:cache:litemage:troubleshooting:exclude-price-block-logged-in-privatecache-header.png?600 |}} | {{ :litespeed_wiki:cache:litemage:troubleshooting:exclude-price-block-logged-in-privatecache-header.png?600 |}} | ||
+ | You should make a backup of the file ''app/code/community/Litespeed/Litemage/Helper/Esi.php'' since it is a customized solution and will be overided by LiteMage upgrade next time. You should copy back the custommized solution when you complete your next upgrade. | ||