This week's book giveaway is in the iOS forum.
We're giving away four copies of Classic Computer Science Problems in Swift and have David Kopec on-line!
See this thread for details.
Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Betterway to use global variable  RSS feed

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am looking for how to use global variables in my web application.
I have properties file in database and thus whenever required, we retrieve from database. All properties are alomost readonly. Once in a while they get changed in database. Thus server restart is not a problem when any value gets changed.

Inorder to increase the performance, I am planning to use global variables for all properties which will make properties available through out the application and reduce the database interaction.

I have an idea of using Static class to save the values and access these values.

Can anybody give me better ways of solving the problem and any flaws of using static class for this purpose.

Thanks & Regards,
Swathi.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!