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

Similar Threads


Top