Static class question
Posted: Thu Apr 22, 2010 3:23 pm
Hi, I was wondering, can a static class take the place of a session?
For instance, if i have a static class that access a DB and stores the result in a static var, once that class has been instantiated how long will it be available?
Basically I want to only access the DB once and store the info so I don't have to query the DB every time I need the same info.
Thanks!
For instance, if i have a static class that access a DB and stores the result in a static var, once that class has been instantiated how long will it be available?
Basically I want to only access the DB once and store the info so I don't have to query the DB every time I need the same info.
Thanks!