I am trying to display random testimonials, but due to magento cache the random is not working, i have to flush the cache each time to see the testimonials change, my code
public function getTestimonialsLast(){
$collection = Mage::getModel('testimonial/testimonial')->getCollection();
$collection->getSelect()->order(new Zend_Db_Expr('RAND()'));
$collection->addFieldToFilter('status',1);
$collection->setPageSize(5);
return $collection;
}
我怎样才能使它工作,我怎样才能使它随时刷新收集是随机的。 任何帮助,不胜感激。 谢谢你在前进,越来越随机推荐在magento由于缓存不工作
在哪座你使用这种方法吗? –