harmmeijer
Programmer
I have a com component Author that has 2 functions:
getAuthor (gets a string wich contains a list of the authors)
updAuthor (updates the authors table in the pubs database)
The aspx page calling the getAuthor function (in the page load) does it like this:
strAuthorlist = Cache("strAuthorlist"
If strAuthorlist Is Nothing Then
' generate a new instance of authors
objAuthors = New Authors.clsauthors()
Cache("strAuthorlist" = objAuthors.getAuthor
objAuthors = nothing
End If
strAuthorlist = Cache("strAuthorlist"
The strAuthorlist will be used in the aspx page, the first time the com component is called, the com component is started wich gets data from the server and puts in in a nice html text string. The next time the page is requested the textstring is taken out of the memory, no com component is created and no database bothered.
Problem is when the updAuthor is called the data will change, this component has to destroy the Cache("strAuthorlist" variable so the next time a list is needed it will be re created.
Question:
How do I destroy this Cached variable from my com component??
getAuthor (gets a string wich contains a list of the authors)
updAuthor (updates the authors table in the pubs database)
The aspx page calling the getAuthor function (in the page load) does it like this:
strAuthorlist = Cache("strAuthorlist"
If strAuthorlist Is Nothing Then
' generate a new instance of authors
objAuthors = New Authors.clsauthors()
Cache("strAuthorlist" = objAuthors.getAuthor
objAuthors = nothing
End If
strAuthorlist = Cache("strAuthorlist"
The strAuthorlist will be used in the aspx page, the first time the com component is called, the com component is started wich gets data from the server and puts in in a nice html text string. The next time the page is requested the textstring is taken out of the memory, no com component is created and no database bothered.
Problem is when the updAuthor is called the data will change, this component has to destroy the Cache("strAuthorlist" variable so the next time a list is needed it will be re created.
Question:
How do I destroy this Cached variable from my com component??