0

In my System I'm using an Object User to store all the needed UserData which I get from the Database.

In the Session I'm storing the User ID. On Page call I query the User Data from the DB and store it into the User-Object.

Now I saw somebody storing all the User-Object into the Session.

I wondered what's the better way?

I saw this Post here on SO, which helped a bit.

But 2 Things:

  1. To lower the risk of Session-Hijacking I'm creating a new Session on every Page Load. Therefore all the Data from the Session Object gets transferred.

  2. Somewhere else I saw that PHP 5 has an Cache already in the Pack. So Does it automatically store the User Object?

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
j_s_stack
  • 667
  • 1
  • 5
  • 18

0 Answers0