Hi all,
i've a problem with caching dataset,
i put this in application start to load dataset in cache memory.
Dim AD As New AgencyData()
Dim ds As DataSet = AD.AgencyCustomerList()
If IsNothing(Context.Cache.Get("AgencyCustomer"
) Then
Context.Cache.Insert("AgencyCustomer", ds)
Else
Context.Cache.Item("AgencyCustomer"
= ds
End If
this procedure is update every 20 min.
Dim aTimer As New System.Timers.Timer(1200000)
AddHandler aTimer.Elapsed, AddressOf OnTimedEvent
aTimer.AutoReset = True
aTimer.Enabled = True
Private Sub OnTimedEvent(ByVal sender As Object, ByVal e As System.Timers.ElapsedEventArgs)
Dim AD As New AgencyData()
Dim ds As DataSet = AD.AgencyCustomerList()
Context.Cache.Item("AgencyCustomer"
= ds
End Sub
ok now my dataset is in my cache, i bind a datagrid on it, all work perfectly,
but after 1 or 2 min i lost my cache, and i wanna know why ?
to resolve it , i check if the "AgencyCustomer" is equal to nothing and i reload it, but it's not a solution for me. My dataset supose to be there until IIS retart.
someone can help me !!
thanks.
--------------------------------
Hugues Gauthier, DEC
Développeur Web
Intelligence Digital
1751 Richardson
Suite 4230
Montréal, Québec
H3K 1G6
hgauthier@intelligencedgt.com
hugues_gauthier@hotmail.com
-------------------
ICQ: 2151800
i've a problem with caching dataset,
i put this in application start to load dataset in cache memory.
Dim AD As New AgencyData()
Dim ds As DataSet = AD.AgencyCustomerList()
If IsNothing(Context.Cache.Get("AgencyCustomer"
Context.Cache.Insert("AgencyCustomer", ds)
Else
Context.Cache.Item("AgencyCustomer"
End If
this procedure is update every 20 min.
Dim aTimer As New System.Timers.Timer(1200000)
AddHandler aTimer.Elapsed, AddressOf OnTimedEvent
aTimer.AutoReset = True
aTimer.Enabled = True
Private Sub OnTimedEvent(ByVal sender As Object, ByVal e As System.Timers.ElapsedEventArgs)
Dim AD As New AgencyData()
Dim ds As DataSet = AD.AgencyCustomerList()
Context.Cache.Item("AgencyCustomer"
End Sub
ok now my dataset is in my cache, i bind a datagrid on it, all work perfectly,
but after 1 or 2 min i lost my cache, and i wanna know why ?
to resolve it , i check if the "AgencyCustomer" is equal to nothing and i reload it, but it's not a solution for me. My dataset supose to be there until IIS retart.
someone can help me !!
thanks.
--------------------------------
Hugues Gauthier, DEC
Développeur Web
Intelligence Digital
1751 Richardson
Suite 4230
Montréal, Québec
H3K 1G6
hgauthier@intelligencedgt.com
hugues_gauthier@hotmail.com
-------------------
ICQ: 2151800