Exemple #1
0
 /**
  * Get cache parameters
  *
  * @return array
  */
 protected function getCacheParameters()
 {
     $list = parent::getCacheParameters();
     $list[] = $this->getProductId();
     return $list;
 }
Exemple #2
0
 /**
  * Get cache parameters
  *
  * @return array
  */
 protected function getCacheParameters()
 {
     $list = parent::getCacheParameters();
     $result = array();
     $profile = \XLite\Core\Auth::getInstance()->getProfile();
     $products = $this->getPageData();
     // Gather reviews and ratings data for each product
     foreach ($products as $product) {
         $result[] = array($product->getProductId(), $product->getAverageRating(), $product->getVotesCount(), $product->getReviewsCount(), $product->isRatedByUser($profile));
     }
     $list[] = md5(serialize($result));
     return $list;
 }