[Mono-bugs] [Bug 52768][Nor] New - Programmatical caching do not work

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 12 Jan 2004 05:06:35 -0500 (EST)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by mwh@sysrq.dk.

http://bugzilla.ximian.com/show_bug.cgi?id=52768

--- shadow/52768	2004-01-12 05:06:35.000000000 -0500
+++ shadow/52768.tmp.21518	2004-01-12 05:06:35.000000000 -0500
@@ -0,0 +1,48 @@
+Bug#: 52768
+Product: Mono/Class Libraries
+Version: unspecified
+OS: 
+OS Details: Mono-0.29, xsp-0.8
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: System.Web
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: mwh@sysrq.dk               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Programmatical caching do not work
+
+The following code sample, displays a label with the timestamp of when its
+loaded.
+
+When reloaded in less than 15 seconds it should load a cached page with the
+same timestamp, it does not.
+
+<!-- Using page caching programmatically and with sliding expiration -->
+<%@ Page Language=C# AutoEventWireup=false %>
+
+<html>
+
+<script runat=server>
+protected override void OnLoad (EventArgs args)
+{
+	Response.Cache.SetExpires (DateTime.Now.AddSeconds (15));
+	Response.Cache.SetCacheability (HttpCacheability.Public);
+	Response.Cache.SetSlidingExpiration (true);
+	Msg.Text = DateTime.Now;
+}
+</script>
+
+<body>
+
+<h3>Output Cache Example</h3>
+<p>Last generated on: <asp:Label id=Msg runat=server />
+<p>Cash lasts for 15 seconds.
+<br>Sliding Expiration is enabled.
+
+</body>
+</html>