How to best manage/store constants in asp.net 2.0 with sql?

S

Steve

I am developing an asp.net 2.0 application and have come across the
dilemma of how to store constant values, which change infrequently. The
website will have tens of thousands of visitors every day.

Obviously there is the application object route.

However, because of the new feature of sql server cache invalidation,
would it not be best just to create a normal data access layer which
can retrieve a datatable containing the constants from a sql table, and
then create a class and associated method for retrieving the data in a
business logic layer.

I would then simply retrieve the contsnt I am after using this object
throughout the pages. If sql invalidation works, the retrieval of data
would only take place if the table has changed.

Does anyone see any inefficiencies or problems with this? Basically I
am suggesting that I don't use the global.asax file at all for storage
of constants throughout an application.
 
J

John Timney \( MVP \)

You could strore the values as an datatable in the cache object, its
application available can be invalidated using sql server cache
invalidation.

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top