Yii Framework Forum: dstroy session - Yii Framework Forum

Jump to content

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

dstroy session want to destroy session(all cached data) Rate Topic: -----

#1 User is offline   ps_sach 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 79
  • Joined: 07-December 09

Posted 15 March 2010 - 08:29 AM

Hi there,

I created session and cached all data required for my application to minimize the database queries.
Now when user logouts I want that session (Cached data) should get destroyed but I don't know how.


 Yii::app()->session["testarray"] = $data_array;  



This is how I am storing my information in cache. Here testarray is the name for that information session and data_array is the information i want to cache.

When User logs in I am setting this values.

Just I want to know that how I can destroy it at the time of logout.
0

#2 User is offline   Mike 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 3,016
  • Joined: 06-October 08
  • Location:Upper Palatinate

Posted 15 March 2010 - 08:32 AM

Session is destroyed automatically when you call CWebUser::logout() and not supply true.
0

#3 User is offline   ps_sach 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 79
  • Joined: 07-December 09

Posted 15 March 2010 - 09:04 AM

Thanks mike
0

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