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),
static Cache DataCache
{
- get
- {
+ get {
if (HttpContext.Current != null)
- return HttpContext.Current.Cache;
+ return HttpContext.Current.InternalCache;
throw new InvalidOperationException ("HttpContext.Current is null.");
}
{
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));