Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs
diff options
context:
space:
mode:
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2005-07-01 02:21:07 +0400
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2005-07-01 02:21:07 +0400
commit926c733cfc734f97333be25cc5b89f1c00a510cf (patch)
treed4fe79c1d10f47823fc2186161251f5b4b3fe1b9 /mcs
parent9fb62d3e4a1c1572234017908f3cc4d64ee7fe9b (diff)
from head
svn path=/branches/mono-1-1-8/mcs/; revision=46800
Diffstat (limited to 'mcs')
-rw-r--r--mcs/class/System.Web/System.Web.Caching/Cache.cs178
-rw-r--r--mcs/class/System.Web/System.Web.Caching/CacheDependency.cs15
-rw-r--r--mcs/class/System.Web/System.Web.Caching/CacheEntry.cs447
-rw-r--r--mcs/class/System.Web/System.Web.Caching/ChangeLog15
4 files changed, 240 insertions, 415 deletions
diff --git a/mcs/class/System.Web/System.Web.Caching/Cache.cs b/mcs/class/System.Web/System.Web.Caching/Cache.cs
index 762bfaf47aa..36266b4d51c 100644
--- a/mcs/class/System.Web/System.Web.Caching/Cache.cs
+++ b/mcs/class/System.Web/System.Web.Caching/Cache.cs
@@ -57,13 +57,6 @@ namespace System.Web.Caching {
_objExpires = new CacheExpires (this);
}
- /// <summary>
- /// Internal method to create a enumerator and over all public
- /// items in the cache and is used by GetEnumerator method.
- /// </summary>
- /// <returns>
- /// Returns IDictionaryEnumerator that contains all public items in the cache
- /// </returns>
private IDictionaryEnumerator CreateEnumerator () {
Hashtable objTable;
@@ -101,42 +94,6 @@ namespace System.Web.Caching {
GetEntry (strKey);
}
- /// <summary>
- /// Adds the specified item to the Cache object with
- /// dependencies, expiration and priority policies, and a
- /// delegate you can use to notify your application when the
- /// inserted item is removed from the Cache.
- /// </summary>
- /// <param name="strKey">The cache key used to reference the item.</param>
- /// <param name="objItem">The item to be added to the cache.</param>
- /// <param name="objDependency">
- /// The file or cache key dependencies for the item. When any
- /// dependency changes, the object becomes invalid and is removed
- /// from the cache. If there are no dependencies, this paramter
- /// contains a null reference.
- /// </param>
- /// <param name="absolutExpiration">
- /// The time at which the added object expires and is removed from the cache.
- /// </param>
- /// <param name="slidingExpiration">
- /// The interval between the time the added object was last
- /// accessed and when that object expires. If this value is the
- /// equivalent of 20 minutes, the object expires and is removed
- /// from the cache 20 minutes after it is last accessed.
- /// </param>
- /// <param name="enumPriority">
- /// The relative cost of the object, as expressed by the
- /// CacheItemPriority enumeration. The cache uses this value when
- /// it evicts objects; objects with a lower cost are removed from
- /// the cache before objects with a higher cost.
- /// </param>
- /// <param name="eventRemoveCallback">
- /// A delegate that, if provided, is called when an object is
- /// removed from the cache. You can use this to notify
- /// applications when their objects are deleted from the
- /// cache.
- /// </param>
- /// <returns>The Object item added to the Cache.</returns>
public object Add (string strKey, object objItem, CacheDependency objDependency,
DateTime absolutExpiration, TimeSpan slidingExpiration,
CacheItemPriority enumPriority, CacheItemRemovedCallback eventRemoveCallback) {
@@ -171,16 +128,16 @@ namespace System.Web.Caching {
// todo: check decay and make up the minHit range
- objEntry = new CacheEntry (this,
- strKey,
- objItem,
- objDependency,
- eventRemoveCallback,
- absolutExpiration,
- slidingExpiration,
- longHitRange,
- pub,
- enumPriority);
+ objEntry = new CacheEntry ( this,
+ strKey,
+ objItem,
+ objDependency,
+ eventRemoveCallback,
+ absolutExpiration,
+ slidingExpiration,
+ longHitRange,
+ pub,
+ enumPriority);
_lockEntries.AcquireWriterLock (-1);
try {
@@ -218,54 +175,16 @@ namespace System.Web.Caching {
return objEntry.Item;
}
- /// <summary>
- /// Inserts an item into the Cache object with a cache key to
- /// reference its location and using default values provided by
- /// the CacheItemPriority enumeration.
- /// </summary>
- /// <param name="strKey">The cache key used to reference the item.</param>
- /// <param name="objItem">The item to be added to the cache.</param>
public void Insert (string strKey, object objItem) {
Add (strKey, objItem, null, NoAbsoluteExpiration, NoSlidingExpiration,
CacheItemPriority.Default, null, true, true);
}
- /// <summary>
- /// Inserts an object into the Cache that has file or key dependencies.
- /// </summary>
- /// <param name="strKey">The cache key used to reference the item.</param>
- /// <param name="objItem">The item to be added to the cache.</param>
- /// <param name="objDependency">
- /// The file or cache key dependencies for the item. When any
- /// dependency changes, the object becomes invalid and is removed
- /// from the cache. If there are no dependencies, this paramter
- /// contains a null reference.
- /// </param>
public void Insert (string strKey, object objItem, CacheDependency objDependency) {
Add (strKey, objItem, objDependency, NoAbsoluteExpiration, NoSlidingExpiration,
CacheItemPriority.Default, null, true, true);
}
- /// <summary>
- /// Inserts an object into the Cache with dependencies and expiration policies.
- /// </summary>
- /// <param name="strKey">The cache key used to reference the item.</param>
- /// <param name="objItem">The item to be added to the cache.</param>
- /// <param name="objDependency">
- /// The file or cache key dependencies for the item. When any
- /// dependency changes, the object becomes invalid and is removed
- /// from the cache. If there are no dependencies, this paramter
- /// contains a null reference.
- /// </param>
- /// <param name="absolutExpiration">
- /// The time at which the added object expires and is removed from the cache.
- /// </param>
- /// <param name="slidingExpiration">The interval between the
- /// time the added object was last accessed and when that object
- /// expires. If this value is the equivalent of 20 minutes, the
- /// object expires and is removed from the cache 20 minutes after
- /// it is last accessed.
- /// </param>
public void Insert (string strKey, object objItem, CacheDependency objDependency,
DateTime absolutExpiration, TimeSpan slidingExpiration) {
@@ -273,40 +192,6 @@ namespace System.Web.Caching {
CacheItemPriority.Default, null, true, true);
}
- /// <summary>
- /// Inserts an object into the Cache object with dependencies,
- /// expiration and priority policies, and a delegate you can use
- /// to notify your application when the inserted item is removed
- /// from the Cache.
- /// </summary>
- /// <param name="strKey">The cache key used to reference the item.</param>
- /// <param name="objItem">The item to be added to the cache.</param>
- /// <param name="objDependency">
- /// The file or cache key dependencies for the item. When any
- /// dependency changes, the object becomes invalid and is removed
- /// from the cache. If there are no dependencies, this paramter
- /// contains a null reference.
- /// </param>
- /// <param name="absolutExpiration">
- /// The time at which the added object expires and is removed from the cache.
- /// </param>
- /// <param name="slidingExpiration">
- /// The interval between the time the added object was last
- /// accessed and when that object expires. If this value is the
- /// equivalent of 20 minutes, the object expires and is removed
- /// from the cache 20 minutes after it is last accessed.
- /// </param>
- /// <param name="enumPriority">The relative cost of the object,
- /// as expressed by the CacheItemPriority enumeration. The cache
- /// uses this value when it evicts objects; objects with a lower
- /// cost are removed from the cache before objects with a higher
- /// cost.
- /// </param>
- /// <param name="eventRemoveCallback">A delegate that, if
- /// provided, is called when an object is removed from the cache.
- /// You can use this to notify applications when their objects
- /// are deleted from the cache.
- /// </param>
public void Insert (string strKey, object objItem, CacheDependency objDependency,
DateTime absolutExpiration, TimeSpan slidingExpiration,
CacheItemPriority enumPriority, CacheItemRemovedCallback eventRemoveCallback) {
@@ -318,37 +203,23 @@ namespace System.Web.Caching {
// Called from other internal System.Web methods to add non-public objects into
// cache, like output cache etc
internal void InsertPrivate (string strKey, object objItem, CacheDependency objDependency,
- DateTime absolutExpiration, TimeSpan slidingExpiration,
- CacheItemPriority enumPriority, CacheItemRemovedCallback eventRemoveCallback) {
-
+ DateTime absolutExpiration, TimeSpan slidingExpiration,
+ CacheItemPriority enumPriority, CacheItemRemovedCallback eventRemoveCallback)
+ {
Add (strKey, objItem, objDependency, absolutExpiration, slidingExpiration,
enumPriority, eventRemoveCallback, false, true);
}
- /// <summary>
- /// Removes the specified item from the Cache object.
- /// </summary>
- /// <param name="strKey">The cache key for the cache item to remove.</param>
- /// <returns>
- /// The item removed from the Cache. If the value in the key
- /// parameter is not found, returns a null reference.
- /// </returns>
+ internal void InsertPrivate (string strKey, object objItem, CacheDependency objDependency)
+ {
+ Add (strKey, objItem, objDependency, NoAbsoluteExpiration, NoSlidingExpiration,
+ CacheItemPriority.Default, null, false, true);
+ }
+
public object Remove (string strKey) {
return Remove (strKey, CacheItemRemovedReason.Removed);
}
- /// <summary>
- /// Internal method that updates the cache, decremenents the
- /// number of existing items and call close on the cache entry.
- /// This method is also used from the ExpiresBuckets class to
- /// remove an item during GC flush.
- /// </summary>
- /// <param name="strKey">The cache key for the cache item to remove.</param>
- /// <param name="enumReason">Reason why the item is removed.</param>
- /// <returns>
- /// The item removed from the Cache. If the value in the key
- /// parameter is not found, returns a null reference.
- /// </returns>
internal object Remove (string strKey, CacheItemRemovedReason enumReason) {
CacheEntry objEntry = null;
@@ -375,11 +246,6 @@ namespace System.Web.Caching {
return objEntry.Item;
}
- /// <summary>
- /// Retrieves the specified item from the Cache object.
- /// </summary>
- /// <param name="strKey">The identifier for the cache item to retrieve.</param>
- /// <returns>The retrieved cache item, or a null reference.</returns>
public object Get (string strKey) {
CacheEntry objEntry = GetEntry (strKey);
@@ -421,16 +287,10 @@ namespace System.Web.Caching {
return objEntry;
}
- /// <summary>
- /// Gets the number of items stored in the cache.
- /// </summary>
public int Count {
get { return _nItems; }
}
- /// <summary>
- /// Gets or sets the cache item at the specified key.
- /// </summary>
public object this [string strKey] {
get {
return Get (strKey);
diff --git a/mcs/class/System.Web/System.Web.Caching/CacheDependency.cs b/mcs/class/System.Web/System.Web.Caching/CacheDependency.cs
index 718b88dd082..03ff93c8a0d 100644
--- a/mcs/class/System.Web/System.Web.Caching/CacheDependency.cs
+++ b/mcs/class/System.Web/System.Web.Caching/CacheDependency.cs
@@ -58,8 +58,12 @@ namespace System.Web.Caching
bool disposed;
CacheEntry [] entries;
CacheItemRemovedCallback removedDelegate;
+
+#if !TARGET_J2EE
+
FileSystemWatcher [] watchers;
+#endif
private CacheDependency ()
{
}
@@ -157,13 +161,17 @@ namespace System.Web.Caching
}
}
+#if !TARGET_J2EE
+
if (filenames.Length > 0) {
watchers = new FileSystemWatcher [filenames.Length];
for (int i=0; i<filenames.Length; i++)
watchers [i] = CreateWatcher (filenames [i]);
}
+#endif
}
+#if !TARGET_J2EE
private FileSystemWatcher CreateWatcher (string file)
{
FileSystemWatcher watcher = new FileSystemWatcher ();
@@ -184,6 +192,7 @@ namespace System.Web.Caching
{
OnChanged (sender, e);
}
+#endif
void CacheItemRemoved (string key, object value, CacheItemRemovedReason reason)
{
@@ -200,11 +209,17 @@ namespace System.Web.Caching
Changed (this, new CacheDependencyChangedArgs (null));
}
+#if TARGET_J2EE
+ public void Dispose ()
+ {
+ }
+#else
public void Dispose ()
{
for (int i=0; i<watchers.Length; i++)
watchers [i].Dispose ();
}
+#endif
public bool HasChanged
{
diff --git a/mcs/class/System.Web/System.Web.Caching/CacheEntry.cs b/mcs/class/System.Web/System.Web.Caching/CacheEntry.cs
index f73a9b3e912..2e6b1683de5 100644
--- a/mcs/class/System.Web/System.Web.Caching/CacheEntry.cs
+++ b/mcs/class/System.Web/System.Web.Caching/CacheEntry.cs
@@ -1,10 +1,10 @@
-//
-// System.Web.Caching
-//
-// Author:
-// Patrik Torstensson
-// Daniel Cazzulino (dcazzulino@users.sf.net)
-//
+//
+// System.Web.Caching
+//
+// Author:
+// Patrik Torstensson
+// Daniel Cazzulino (dcazzulino@users.sf.net)
+//
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -26,252 +26,187 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-
-using System;
-using System.Threading;
-
-namespace System.Web.Caching {
- /// <summary>
- /// Class responsible for representing a cache entry.
- /// </summary>
- internal class CacheEntry {
- internal enum Flags {
- Removed = 1,
- Public = 2
- }
-
- private CacheItemPriority _enumPriority;
-
- private long _longHits;
-
- private byte _byteExpiresBucket;
- private int _intExpiresIndex;
-
- private long _ticksExpires;
- private long _ticksSlidingExpiration;
-
- private string _strKey;
- private object _objItem;
-
- private long _longMinHits;
-
- private Flags _enumFlags;
-
- private CacheDependency _objDependency;
- private Cache _objCache;
-
- internal static readonly byte NoBucketHash = byte.MaxValue;
- internal static readonly int NoIndexInBucket = int.MaxValue;
-
- internal event CacheItemRemovedCallback _onRemoved;
-
- private ReaderWriterLock _lock = new ReaderWriterLock();
-
- /// <summary>
- /// Constructs a new cache entry
- /// </summary>
- /// <param name="strKey">The cache key used to reference the item.</param>
- /// <param name="objItem">The item to be added to the cache.</param>
- /// <param name="objDependency">The file or cache key dependencies for the item. When any dependency changes, the object becomes invalid and is removed from the cache. If there are no dependencies, this paramter contains a null reference.</param>
- /// <param name="dtExpires">The time at which the added object expires and is removed from the cache. </param>
- /// <param name="tsSpan">The interval between the time the added object was last accessed and when that object expires. If this value is the equivalent of 20 minutes, the object expires and is removed from the cache 20 minutes after it is last accessed.</param>
- /// <param name="longMinHits">Used to detect and control if the item should be flushed due to under usage</param>
- /// <param name="boolPublic">Defines if the item is public or not</param>
- /// <param name="enumPriority">The relative cost of the object, as expressed by the CacheItemPriority enumeration. The cache uses this value when it evicts objects; objects with a lower cost are removed from the cache before objects with a higher cost.</param>
- internal CacheEntry (Cache objManager, string strKey, object objItem, CacheDependency objDependency, CacheItemRemovedCallback eventRemove,
- System.DateTime dtExpires, System.TimeSpan tsSpan, long longMinHits, bool boolPublic, CacheItemPriority enumPriority ) {
- if (boolPublic)
- _enumFlags |= Flags.Public;
-
- _strKey = strKey;
- _objItem = objItem;
- _objCache = objManager;
-
- _onRemoved += eventRemove;
-
- _enumPriority = enumPriority;
-
- _ticksExpires = dtExpires.ToUniversalTime ().Ticks;
-
- _ticksSlidingExpiration = tsSpan.Ticks;
-
- // If we have a sliding expiration it overrides the absolute expiration (MS behavior)
- // This is because sliding expiration causes the absolute expiration to be
- // moved after each period, and the absolute expiration is the value used
- // for all expiration calculations.
- if (tsSpan.Ticks != Cache.NoSlidingExpiration.Ticks)
- _ticksExpires = System.DateTime.UtcNow.AddTicks(_ticksSlidingExpiration).Ticks;
-
- _objDependency = objDependency;
- if (_objDependency != null)
- // Add the entry to the cache dependency handler (we support multiple entries per handler)
- _objDependency.Changed += new CacheDependencyChangedHandler (OnChanged);
-
- _longMinHits = longMinHits;
- }
-
-
- internal void OnChanged (object sender, CacheDependencyChangedArgs objDependency) {
- _objCache.Remove (_strKey, CacheItemRemovedReason.DependencyChanged);
- }
-
- /// <summary>
- /// Cleans up the cache entry, removes the cache dependency and calls the remove delegate.
- /// </summary>
- /// <param name="enumReason">The reason why the cache entry are going to be removed</param>
- internal void Close(CacheItemRemovedReason enumReason) {
- Delegate [] removedEvents = null;
-
- _lock.AcquireWriterLock(-1);
- try {
- // Check if the item already is removed
- if ((_enumFlags & Flags.Removed) != 0)
- return;
-
- _enumFlags |= Flags.Removed;
-
- if (_onRemoved != null)
- removedEvents = _onRemoved.GetInvocationList ();
- }
- finally {
- _lock.ReleaseWriterLock();
- }
-
- if (removedEvents != null) {
- // Call the delegate to tell that we are now removing the entry
- if ((_enumFlags & Flags.Public) != 0) {
- foreach (Delegate del in removedEvents) {
- CacheItemRemovedCallback removed = (CacheItemRemovedCallback) del;
- try {
- removed (_strKey, _objItem, enumReason);
- }
- catch (System.Exception obj) {
- HttpApplicationFactory.SignalError (obj);
- }
- }
- }
- else {
- foreach (Delegate del in removedEvents) {
- CacheItemRemovedCallback removed = (CacheItemRemovedCallback) del;
- try {
- removed (_strKey, _objItem, enumReason);
- }
- catch (Exception) {
- }
- }
- }
- }
-
- _lock.AcquireWriterLock(-1);
- try {
- // If we have a dependency, remove the entry
- if (_objDependency != null)
- _objDependency.Changed -= new CacheDependencyChangedHandler (OnChanged);
- }
- finally {
- _lock.ReleaseWriterLock();
- }
- }
-
- internal bool HasUsage {
- get {
- if (_longMinHits == System.Int64.MaxValue)
- return false;
-
- return true;
- }
- }
-
- internal bool HasAbsoluteExpiration {
- get {
- if (_ticksExpires == Cache.NoAbsoluteExpiration.Ticks)
- return false;
-
- return true;
- }
- }
-
- internal bool HasSlidingExpiration {
- get {
- if (_ticksSlidingExpiration == Cache.NoSlidingExpiration.Ticks)
- return false;
-
- return true;
- }
- }
-
- internal byte ExpiresBucket {
- get {
- return _byteExpiresBucket;
- }
- set {
- _byteExpiresBucket = value;
- }
- }
-
- internal int ExpiresIndex {
- get {
- return _intExpiresIndex;
- }
-
- set {
- _intExpiresIndex = value;
- }
- }
-
- internal long Expires {
- get {
- return _ticksExpires;
- }
- set {
- _ticksExpires = value;
- }
- }
-
- internal long SlidingExpiration {
- get {
- return _ticksSlidingExpiration;
- }
- }
-
- internal object Item {
- get {
- return _objItem;
- }
- }
-
- internal string Key {
- get {
- return _strKey;
- }
- }
-
- internal long Hits {
- get {
- return _longHits;
- }
- }
-
- internal long MinimumHits {
- get {
- return _longMinHits;
- }
- }
-
- internal CacheItemPriority Priority {
- get {
- return _enumPriority;
- }
- }
-
- internal bool IsPublic {
- get {
- return (_enumFlags & Flags.Public) != 0;
- }
- }
-
- internal void Hit () {
- Interlocked.Increment (ref _longHits);
- }
- }
-}
+
+using System;
+using System.Threading;
+
+namespace System.Web.Caching {
+ internal class CacheEntry {
+ enum Flags {
+ Removed = 1,
+ Public = 2
+ }
+
+ internal static readonly byte NoBucketHash = byte.MaxValue;
+ internal static readonly int NoIndexInBucket = int.MaxValue;
+
+ CacheItemPriority _enumPriority;
+ long _longHits;
+ byte _byteExpiresBucket;
+ int _intExpiresIndex;
+ long _ticksExpires;
+ long _ticksSlidingExpiration;
+ string _strKey;
+ object _objItem;
+ long _longMinHits;
+ Flags _enumFlags;
+ CacheDependency _objDependency;
+ Cache _objCache;
+ ReaderWriterLock _lock = new ReaderWriterLock();
+
+ internal event CacheItemRemovedCallback _onRemoved;
+
+ internal CacheEntry (Cache objManager, string strKey, object objItem,CacheDependency objDependency,
+ CacheItemRemovedCallback eventRemove, DateTime dtExpires, TimeSpan tsSpan,
+ long longMinHits, bool boolPublic, CacheItemPriority enumPriority )
+ {
+ if (boolPublic)
+ _enumFlags |= Flags.Public;
+
+ _strKey = strKey;
+ _objItem = objItem;
+ _objCache = objManager;
+ _onRemoved += eventRemove;
+ _enumPriority = enumPriority;
+ _ticksExpires = dtExpires.ToUniversalTime ().Ticks;
+ _ticksSlidingExpiration = tsSpan.Ticks;
+
+ // If we have a sliding expiration it overrides the absolute expiration (MS behavior)
+ // This is because sliding expiration causes the absolute expiration to be
+ // moved after each period, and the absolute expiration is the value used
+ // for all expiration calculations.
+ if (tsSpan.Ticks != Cache.NoSlidingExpiration.Ticks)
+ _ticksExpires = DateTime.UtcNow.AddTicks (_ticksSlidingExpiration).Ticks;
+
+ _objDependency = objDependency;
+ if (_objDependency != null)
+ // Add the entry to the cache dependency handler (we support multiple entries per handler)
+ _objDependency.Changed += new CacheDependencyChangedHandler (OnChanged);
+
+ _longMinHits = longMinHits;
+ }
+
+
+ internal void OnChanged (object sender, CacheDependencyChangedArgs objDependency)
+ {
+ _objCache.Remove (_strKey, CacheItemRemovedReason.DependencyChanged);
+ }
+
+ internal void Close (CacheItemRemovedReason enumReason)
+ {
+ Delegate [] removedEvents = null;
+
+ _lock.AcquireWriterLock(-1);
+ try {
+ // Check if the item already is removed
+ if ((_enumFlags & Flags.Removed) != 0)
+ return;
+
+ _enumFlags |= Flags.Removed;
+
+ if (_onRemoved != null)
+ removedEvents = _onRemoved.GetInvocationList ();
+ } finally {
+ _lock.ReleaseWriterLock();
+ }
+
+ if (removedEvents != null) {
+ // Call the delegate to tell that we are now removing the entry
+ foreach (Delegate del in removedEvents) {
+ CacheItemRemovedCallback removed = (CacheItemRemovedCallback) del;
+ try {
+ removed (_strKey, _objItem, enumReason);
+ } catch (Exception obj) {
+ if (IsPublic)
+ HttpApplicationFactory.SignalError (obj);
+ }
+ }
+ }
+
+ _lock.AcquireWriterLock(-1);
+ try {
+ // If we have a dependency, remove the entry
+ if (_objDependency != null)
+ _objDependency.Changed -= new CacheDependencyChangedHandler (OnChanged);
+ } finally {
+ _lock.ReleaseWriterLock();
+ }
+ }
+
+ internal bool HasUsage {
+ get {
+ if (_longMinHits == System.Int64.MaxValue)
+ return false;
+
+ return true;
+ }
+ }
+
+ internal bool HasAbsoluteExpiration {
+ get {
+ if (_ticksExpires == Cache.NoAbsoluteExpiration.Ticks)
+ return false;
+
+ return true;
+ }
+ }
+
+ internal bool HasSlidingExpiration {
+ get {
+ if (_ticksSlidingExpiration == Cache.NoSlidingExpiration.Ticks)
+ return false;
+
+ return true;
+ }
+ }
+
+ internal byte ExpiresBucket {
+ get { return _byteExpiresBucket; }
+ set { _byteExpiresBucket = value; }
+ }
+
+ internal int ExpiresIndex {
+ get { return _intExpiresIndex; }
+ set { _intExpiresIndex = value; }
+ }
+
+ internal long Expires {
+ get { return _ticksExpires; }
+ set { _ticksExpires = value; }
+ }
+
+ internal long SlidingExpiration {
+ get { return _ticksSlidingExpiration; }
+ }
+
+ internal object Item {
+ get { return _objItem; }
+ }
+
+ internal string Key {
+ get { return _strKey; }
+ }
+
+ internal long Hits {
+ get { return _longHits; }
+ }
+
+ internal long MinimumHits {
+ get { return _longMinHits; }
+ }
+
+ internal CacheItemPriority Priority {
+ get { return _enumPriority; }
+ }
+
+ internal bool IsPublic {
+ get { return (_enumFlags & Flags.Public) != 0; }
+ }
+
+ internal void Hit ()
+ {
+ Interlocked.Increment (ref _longHits);
+ }
+ }
+}
+
diff --git a/mcs/class/System.Web/System.Web.Caching/ChangeLog b/mcs/class/System.Web/System.Web.Caching/ChangeLog
index 63de1ff1184..84201bd64e4 100644
--- a/mcs/class/System.Web/System.Web.Caching/ChangeLog
+++ b/mcs/class/System.Web/System.Web.Caching/ChangeLog
@@ -1,3 +1,18 @@
+2005-06-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * Cache.cs: added new InsertPrivate overload.
+
+2005-06-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * Cache.cs:
+ * CacheEntry.cs: style. Removed doc. comments.
+
+2005-06-08 Ilya Kharmatsky <ilyak-at-mainsoft.com>
+
+ * CacheDependency.cs - added TARGET_JVM directives in places,
+ where file watching is using (Mainsoft's implementation currently
+ doesn't support the feature).
+
2005-05-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* CacheEntry.cs: credits for this patch should go to mcs. it catched