Use UNIX line endings consistently
[mono.git] / mcs / class / System.Web / System.Web.UI.WebControls / DataSourceCacheManager.cs
index f5f70fb41acab183310987079794555e66dd24b1..78be86d371f6ec558c05f1b461b40dbad90c14a4 100644 (file)
@@ -88,14 +88,14 @@ namespace System.Web.UI.WebControls
                                if (cacheExpirationPolicy == DataSourceCacheExpiry.Absolute)
                                        absoluteExpiration = DateTime.Now.AddSeconds (cacheDuration);
                                else
-                                       slidindExpiraion = new TimeSpan (cacheDuration * 10000);
+                                       slidindExpiraion = new TimeSpan (0, 0, cacheDuration);
                        }
 
                        string [] dependencies;
                        if (cacheKeyDependency.Length > 0)
-                               dependencies = new string [] { cacheKeyDependency, controlID };
+                               dependencies = new string [] { cacheKeyDependency };
                        else
-                               dependencies = new string [] { controlID };
+                               dependencies = new string [] { };
 
                        DataCache.Add (key, o,
                                new CacheDependency (new string [] { }, dependencies),
@@ -104,10 +104,9 @@ namespace System.Web.UI.WebControls
 
                static Cache DataCache
                {
-                       get
-                       {
+                       get {
                                if (HttpContext.Current != null)
-                                       return HttpContext.Current.Cache;
+                                       return HttpContext.Current.InternalCache;
 
                                throw new InvalidOperationException ("HttpContext.Current is null.");
                        }
@@ -117,6 +116,9 @@ namespace System.Web.UI.WebControls
                {
                        StringBuilder sb = new StringBuilder (methodName);
 
+                       if (owner != null)
+                               sb.Append (owner.ID);
+
                        for (int i = 0; i < parameters.Count; i++) {
                                sb.Append (parameters [i].Name);
                                sb.Append (parameters [i].GetValue (context, owner));