Caching App Data

D

Dave T

The data for my web app is an object model that consists of a class with a
series of properties typed as generic.list(of SomeClass). The object model
gets built up along the way by calls to SQL Server. Some of the data is
global data, some of it is user data. Instead of making multiple calls to
the DB to get the same data, I was thinking that I could cache the object
model and retrieve it.

To do that in .net 1.1, I would have done something like this

Dim _GobalData as new GlobalDataObjectModel
_GobalData = Cache("GlobalData")
If _GlobalData Is Nothing Then
_GlobalData = CreateGlobalData
Cache("GlobalData") = _GlobalData
End IF
UseGlobalData()

It seems caching in .net 2.0 is quite different. For one thing, there seems
to be a problem with my reference to *cache*. Is it possible to do this? If
so, what is the namespace for *cache*? Do I need to do this some other way?
 

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,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top