Link to home
Start Free TrialLog in
Avatar of itnifl
itniflFlag for Norway

asked on

C# MVC and a global static factory that never dies

I am making a static factory class in my C# MVC project. I want it to be global for the user session, and I want it's private static properties to live as long as the session lives. The private properties contain cached factory products that I want to re-use if needed.

Alternatively, the static factory class can be global for the whole system regardless of user sessions. The products are classes with grouped access methods to the database, so users sharing these on the server side should be no problem.
ASKER CERTIFIED SOLUTION
Avatar of Dennis Aries
Dennis Aries
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of itnifl

ASKER

Nice, so if I store objects in that static class, they will persist between users and sessions?
Yes it will.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial