PHP Class Aligent_CacheObserver_Model_Observer

Author: ModuleCreator
显示文件 Open project: aligent/cacheobserver

Protected Properties

Property Type Description
$_aNeverCacheBlocks array Blocks that should never be cached
$iCacheLifetime integer Cache lifetime

Public Methods

Method Description
__construct ( ) Sets the cache lifetime from store configuration
customBlockCache ( Varien_Event_Observer $observer ) : self
replaceFormKey ( Varien_Event_Observer $observer ) : self Replace the form key

Protected Methods

Method Description
_generateCategoryCacheKey ( Varien_Event_Observer $observer, string $sKey ) : string Generate a category cache key
_getParamKey ( string $vParam ) : string Creates a Key from the request param. This key is used for creating unique Cache Key, and Cache Tag
_getProductId ( ) : mixed Fetches the current product id from two possible registry keys.
_getReviewToolBarKey ( ) : string This creates a Key for the Review List ToolBar based on params Page:P and Review Limit:limit.

Private Methods

Method Description
_generateProductCacheKey ( Varien_Event_Observer $observer, Mage_Catalog_Model_Product $oProduct, string $reviewKey, string $alias, string $vTemplate ) : string Create separate cached block for each product, viewed by each customer group (e.g. to cache different tax display rules)
_generateProductCacheTags ( Varien_Event_Observer $observer, Mage_Catalog_Model_Product $oProduct ) : array Accommodated grouped products by adding the tag for each associated product.

Method Details

__construct() public method

Sets the cache lifetime from store configuration
public __construct ( )

_generateCategoryCacheKey() protected method

Generate a category cache key
protected _generateCategoryCacheKey ( Varien_Event_Observer $observer, string $sKey ) : string
$observer Varien_Event_Observer
$sKey string
return string

_getParamKey() protected method

Creates a Key from the request param. This key is used for creating unique Cache Key, and Cache Tag
protected _getParamKey ( string $vParam ) : string
$vParam string
return string

_getProductId() protected method

Fetches the current product id from two possible registry keys.
protected _getProductId ( ) : mixed
return mixed

_getReviewToolBarKey() protected method

This creates a Key for the Review List ToolBar based on params Page:P and Review Limit:limit.
protected _getReviewToolBarKey ( ) : string
return string

customBlockCache() public method

public customBlockCache ( Varien_Event_Observer $observer ) : self
$observer Varien_Event_Observer
return self

replaceFormKey() public method

Replace the form key
public replaceFormKey ( Varien_Event_Observer $observer ) : self
$observer Varien_Event_Observer
return self

Property Details

$_aNeverCacheBlocks protected_oe property

Blocks that should never be cached
protected array $_aNeverCacheBlocks
return array

$iCacheLifetime protected_oe property

Cache lifetime
protected int $iCacheLifetime
return integer