Asp.net caching?

Does asp.net caching work on JodoHost?

I tried the following on a page:
<%@ OutputCache Duration="300" Location="Server" VaryByParam="*" %>

But it doesn't seem to work and the page takes same time to refresh.
 
you can test it yourself, changing some html on aspx page, and refresh it. if change isn't on screen, caching is working :)
 
Or it just noticed the source file changed :p
It's server side caching, not client side. The page would still get transferred, but possibly repetition of some expensive SQL queries would be avoided. Stuff like that :p
 
Thanks for answering.

I found this test code on usenet that really helps test whether the caching is working. Once you set proper duration, you can go on refreshing and the time displayed doesn't change till the duration is over.

<%@ Page language=C# %>
<%@ OutputCache Duration="120" VaryByParam="none" %>
<%@ Import Namespace="System.Threading" %>
<html> <head>
<title>
</title>
</head>
<script runat=server>
protected void Page_Load(Object src, EventArgs e)
{
msg.Text = "Timestamp: " + DateTime.Now.ToString();
}
</script>
<body>
<form runat="server">
<h1>OutputCache</h1>
<asp:Label id="msg" runat=server/>
<br>
</form>
</body> </html>
 
Back
Top