Geeks With Blogs

News



Add to Google

Tim Hibbard CEO for EnGraph software

Dru came up the other day and we looking at implementing caching into Where's Tim. Turns out, the AJAXPro library that I use already contains caching capabilities. So take an AJAX function like this:

<AjaxPro.AjaxMethod()> _
    Public Function GetYahooTraffic(ByVal xmlAddress As String) As Traffic()


and then add a AjaxServerCache attribute to the function. The "300" is the number of seconds that the data should be cached. Like this:

<AjaxPro.AjaxMethod(), AjaxPro.AjaxServerCache(300)> _
    Public Function GetYahooTraffic(ByVal xmlAddress As String) As Traffic()


The caching engine is smart enough to cache the data associated with the method signature. So if I call the same method with a different value for the xmlAddress parameter, I will get a new result.

More information here

Posted on Friday, July 21, 2006 9:46 AM .NET , Where's Tim , | Back to top


Comments on this post: Using Caching with AJAXPro - AjaxServerCache

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Tim Hibbard | Powered by: GeeksWithBlogs.net