0

Any recommendations for implementing caching in ASP Classic. Server is Windows 2008 with IIS 7.5

3
Contributors
2
Replies
13
Views
3 Years
Discussion Span
Last Post by dom246
0

If you are caching blocks of data that won't change based on the user, then I would highly recommend using Application variables. You can simply do something like:

if Not IsDate(Application("var_date")) then Application("var_date") = Now() - 1

if Application("var_date") < Now Then
    Application("html_cache") = "INSERT HTML HERE"
    Application("var_date") = DateAdd("n",5,Now)
end if
Response.Write(Application("html_cache"))

This will cache for 5 minutes and this method can be very powerful if you are working with high volume sites. This is best used where you are hitting your database.

Edited by dom246

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.