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?
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?