Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_professional thread: caching data


Message #1 by "sundar srinivasan" <ssrinivasan3@n...> on Thu, 13 Mar 2003 20:41:35
In my .net dll I cached an object using the httpcontext object.
I refresh the page and this time around the cash is unavailable.

The code is as follows for storing in cache:

 Dim objHttpContext As HttpContext = HttpContext.Current()
objHttpContext.Cache.Insert(strCacheName, docStyle, _
                                            New CacheDependency
(objHttpContext.Server.MapPath("strXSLName")))

Retrieving the cache is as follows:

     docStyle = objHttpContext.Cache.Get(strCacheName)
      If docStyle Is Nothing Then ...

docStyle shows as nothing.

Any help would be appreciated.

Thanks.


  Return to Index