Yii Framework Forum: Yii Memcache Problem - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Yii Memcache Problem Yii memcache Problem Rate Topic: -----

#1 User is offline   riteshupadhyay 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 19-January 12
  • Location:Ahmedabad

Posted 27 September 2013 - 11:58 PM

Hello

i use yiiframework.ru/doc/guide/en/caching.data to implement cache but i found some issue
ex:
$popularSql = "select ph.upc, p.productTitle, p.image, p.imagenew, sr.productId, ph.price, ph.affilateUrl, ph.url from salesrank as sr LEFT JOIN product as p ON sr.productId=p.productId LEFT JOIN pricehistory as ph ON p.upc=ph.upc 
		RIGHT JOIN(select c.pricehistoryId,  max(c.pricehistoryId) phId
                        from
               			pricehistory c
                        group by
               			c.upc
                        order by
               			c.pricehistoryId ) LPC
               			on ph.pricehistoryId = phId
			               where p.productTitle!='' && ph.price!='' && (ph.affilateUrl!='' || ph.url!='')
group by rank order by MAX(rank) ASC limit 4";[/size]
[size="2"]if(!isset(Yii::app()->session['adminLogin'])|| Yii::app()->session['adminLogin']==NULL){[/size][size="2"]		[/size]

				$id="site_101";
				$popularData101=Yii::app()->cache->get($id);
				if($popularData101===false)
				{
					$popularData=$connection->createCommand($popularSql)->queryAll();
					Yii::app()->cache->set($id,$popularData,3600);
				}else{
					$popularData=$popularData101;
				}
			}	

//Cache End
but this memcache not reflecting after 3600 second=1 hour?

same way cactivedataprovide i have same issue how to set & get
i can't find solution please guide me
thanks in advance
1

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users