public object Add (string key, object value, CacheDependency dependencies, DateTime absoluteExpiration, TimeSpan slidingExpiration, CacheItemPriority priority, CacheItemRemovedCallback onRemoveCallback)
{
if (key == null)
throw new ArgumentNullException ("key");
try {
cacheLock.EnterWriteLock ();
CacheItem it = cache [key];
if (it != null)
return it.Value;
Insert (key, value, dependencies, absoluteExpiration, slidingExpiration, priority, onRemoveCallback, null, false);
} finally {
// See comment at the top of the file, above cacheLock declaration
cacheLock.ExitWriteLock ();
}
return null;
}