I’m not talking about asp.net membership.
For each logged user I want to cache some properties like status or the number of friend requests, from the db.
I can create custom class which would do it but I thought it will be better to extend the existing User.Identity property.
Something like this:
Label1.Text = User.Identity.Status;
It is possible?
Based on your example, I believe you should be caching things like status and number of friend requests in the session data.
The possible downside of using the Identity for this caching is that, if I am not mistaken, each request results in a new Identity instance being created. So for each request you will need to repopulate these Identity values from somewhere, either the DB or some place that you have already cached the data anyway.