Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

8
  • If I save it in Session is it going to be the save instance for different users? Commented Jan 7, 2014 at 9:32
  • Why should it be the same for different users if it's saved in session? Each user has their own unique session! Commented Jan 7, 2014 at 9:41
  • No as Mark said, this will be fine the only problem is that you save it redundant and you should think about if you really want that I think a database table is the better option. This is also flexible for the future if you want to change your tokens or whatever comes next... Commented Jan 7, 2014 at 9:48
  • I the tokens set are the same for all user in current time interval, I don't want to read each time from file or database. I need that this object will be single instance and global for all pages and users. Commented Jan 7, 2014 at 9:48
  • @NickF Well in this case you should use constants in the class, I will edit my answer with an example, give me 2 minutes... Commented Jan 7, 2014 at 9:50