|
-
Aug 30th, 2003, 04:40 PM
#1
Thread Starter
Junior Member
caching question
I thought that if I set up caching, it is supposed to stay resident in the web server unless I restart it.
IN my following code-behind, the very first time in the page for every user, it always populates the cache. I am expecting the cache to be populated only once until I remove it.
<code>
DsCrewChief1 = Cache.Get("CrewChief")
If DsCrewChief1 Is Nothing Then 'it goes into this if statement the first time thru the page
Dim clsNCVACBLL As New NCVACBLL.Scheduling(CType(Application("strDataSource"), String))
DsCrewChief1 = New dsCrewChief
DsCrewChief1 = clsNCVACBLL.SelectCrewChief()
Cache.Insert("CrewChief", DsCrewChief1, Nothing)
clsNCVACBLL.Dispose()
End If
</code>
This is at the top of my HTML:
<code>
<%@ Reference Page="..\Default.aspx" %>
<%@ Register TagPrefix="mbrsc" Namespace="MetaBuilders.WebControls" Assembly="MetaBuilders.WebControls.RowSelectorColumn" %>
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="SignUp.aspx.vb" Inherits="NCVAC.SignUp"%>
</code>
On subsequent postbacks, it does read the data from cache. But, if I end my browser session and start the project again, it re-populates the cache which, again, I'm not expecting it to do. I'm expecting it to read it from cache since the dataset should be populated. I am NOT setting this dataset to NOTHING anywhere in the code...
What concept am I missing here? Am I supposed to set something up on the webserver (IIS5.1)?
Thanks,
Bill Yeager (BCIP, MCP)
BrainBench Certified Internet Professional
Microsoft Certified Professional
YeagerTech Consulting, Inc.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|