Thursday, September 23, 2010

Public Opinion Needed

I have my Users who save favourite Posts

 

At login I get all the saved Posts id’s and save then to the users session, when they save new one it adds it’s ID to the list, delete removes the ID from the session. Now this list can get rather long as you can imagine say roughly 200 saved favourite id’s.

 

Now rather than Session I have the option of CACHE to do the same thing. Cache the users fav’s on login, add / delete to the cached list.

 

Session seems best since its created and deleted on login / logout but is there a performance difference from the 2 that anyone knows of? I made a dummy files with 1000 id’s and the file size was 7k so its still rather a small amount of data. So sticking with the session seems best but would like to hear what others think.

 

Any feedback would be great.

 

Thanks.

 

Dave

No comments: