[Mono-bugs] [Bug 52778][Wis] New - Before-time object removal from cache.

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 12 Jan 2004 10:48:50 -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 mono-bug@jerryweb.info.

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

--- shadow/52778	2004-01-12 10:48:50.000000000 -0500
+++ shadow/52778.tmp.23180	2004-01-12 10:48:50.000000000 -0500
@@ -0,0 +1,68 @@
+Bug#: 52778
+Product: Mono/Class Libraries
+Version: unspecified
+OS: GNU/Linux [Other]
+OS Details: Gentoo 1.4
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: System.Web
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: mono-bug@jerryweb.info               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Before-time object removal from cache.
+
+Subject: Before-time object removal from cache.
+
+When an object with nonzero slidingExpiration value is placed to
+System.Web.Caching.Cache, the expiration time limit is not modified if the
+object is accessed.
+
+Steps to reproduce the problem:
+
+For time lasting more than 10 seconds reload permanently the following page:
+===================================================================================
+<%@ Page Language="C#" %>
+<script runat="server" >
+   private string Pokus() {
+      string key = "test";
+      System.Web.Caching.Cache cache =  HttpRuntime.Cache;
+      string retVal = cache[key] as string;
+      if(retVal == null)
+      {
+         Response.Write("retVal == null<br />");
+         retVal = "abcd";
+         cache.Add(
+            key,
+            retVal,
+            null,
+            DateTime.MaxValue,
+            TimeSpan.FromSeconds(10),
+            CacheItemPriority.Default,
+            null);
+      }
+      return retVal;
+   }
+</script><?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title></title>
+</head>
+<body>
+<p>
+<% Response.Write(Pokus()); %></p>
+</body>
+<html>
+===================================================================================
+
+(Behavior observed:) The function Pokus() is returning "abcd" value during
+10 seconds; after 10 seconds it also returns value "retVal == null", as
+when page loaded for the first time - in spite of fact that relevant object
+should be still cached (due to permanent reloading).