diff --git a/BitFaster.Caching/CachePolicy.cs b/BitFaster.Caching/CachePolicy.cs
index 8ec6c672..1fdd7f36 100644
--- a/BitFaster.Caching/CachePolicy.cs
+++ b/BitFaster.Caching/CachePolicy.cs
@@ -6,6 +6,10 @@
namespace BitFaster.Caching
{
+ ///
+ /// Represents the cache policy. Cache policy is dependent on the parameters chosen
+ /// when constructing the cache.
+ ///
public class CachePolicy
{
public CachePolicy(IBoundedPolicy eviction, ITimePolicy expireAfterWrite)
@@ -14,8 +18,16 @@ public CachePolicy(IBoundedPolicy eviction, ITimePolicy expireAfterWrite)
this.ExpireAfterWrite = expireAfterWrite;
}
+ ///
+ /// Gets the bounded size eviction policy. This policy evicts items from the cache
+ /// if it exceeds capacity.
+ ///
public IBoundedPolicy Eviction { get; }
+ ///
+ /// Gets the expire after write policy, if any. This policy evicts items after a
+ /// fixed duration since an entry's creation or most recent replacement.
+ ///
public ITimePolicy ExpireAfterWrite { get; }
}
}
diff --git a/BitFaster.Caching/IAsyncCache.cs b/BitFaster.Caching/IAsyncCache.cs
index 970b3ee2..7700e124 100644
--- a/BitFaster.Caching/IAsyncCache.cs
+++ b/BitFaster.Caching/IAsyncCache.cs
@@ -28,6 +28,9 @@ public interface IAsyncCache : IEnumerable>
///
ICacheEvents Events { get; }
+ ///
+ /// Gets the cache policy.
+ ///
CachePolicy Policy { get; }
///
diff --git a/BitFaster.Caching/IBoundedPolicy.cs b/BitFaster.Caching/IBoundedPolicy.cs
index 07b423e4..1cd50e50 100644
--- a/BitFaster.Caching/IBoundedPolicy.cs
+++ b/BitFaster.Caching/IBoundedPolicy.cs
@@ -6,6 +6,9 @@
namespace BitFaster.Caching
{
+ ///
+ /// Represents a bounded size cache policy.
+ ///
public interface IBoundedPolicy
{
///
diff --git a/BitFaster.Caching/ICache.cs b/BitFaster.Caching/ICache.cs
index 5b85b71a..deff9872 100644
--- a/BitFaster.Caching/ICache.cs
+++ b/BitFaster.Caching/ICache.cs
@@ -33,6 +33,9 @@ public interface ICache : IEnumerable>
///
ICacheEvents Events { get; }
+ ///
+ /// Gets the cache policy.
+ ///
CachePolicy Policy { get; }
///
diff --git a/BitFaster.Caching/IScopedAsyncCache.cs b/BitFaster.Caching/IScopedAsyncCache.cs
index e02cb887..16bd158c 100644
--- a/BitFaster.Caching/IScopedAsyncCache.cs
+++ b/BitFaster.Caching/IScopedAsyncCache.cs
@@ -32,6 +32,9 @@ public interface IScopedAsyncCache : IEnumerable
///
ICacheEvents> Events { get; }
+ ///
+ /// Gets the cache policy.
+ ///
CachePolicy Policy { get; }
///
diff --git a/BitFaster.Caching/IScopedCache.cs b/BitFaster.Caching/IScopedCache.cs
index 69f172e9..3d782dfc 100644
--- a/BitFaster.Caching/IScopedCache.cs
+++ b/BitFaster.Caching/IScopedCache.cs
@@ -37,6 +37,9 @@ public interface IScopedCache : IEnumerable>> wh
///
ICacheEvents> Events { get; }
+ ///
+ /// Gets the cache policy.
+ ///
CachePolicy Policy { get; }
///
diff --git a/BitFaster.Caching/ITimePolicy.cs b/BitFaster.Caching/ITimePolicy.cs
index 90804fff..e9192478 100644
--- a/BitFaster.Caching/ITimePolicy.cs
+++ b/BitFaster.Caching/ITimePolicy.cs
@@ -6,6 +6,9 @@
namespace BitFaster.Caching
{
+ ///
+ /// Represents a time based cache policy.
+ ///
public interface ITimePolicy
{
///
diff --git a/BitFaster.Caching/ScopedAsyncCache.cs b/BitFaster.Caching/ScopedAsyncCache.cs
index 0e4c93d0..5e254d10 100644
--- a/BitFaster.Caching/ScopedAsyncCache.cs
+++ b/BitFaster.Caching/ScopedAsyncCache.cs
@@ -38,6 +38,7 @@ public ScopedAsyncCache(IAsyncCache> cache)
///
public ICacheEvents> Events => this.cache.Events;
+ ///
public CachePolicy Policy => this.cache.Policy;
///
diff --git a/BitFaster.Caching/ScopedCache.cs b/BitFaster.Caching/ScopedCache.cs
index dfaf99ee..5549cb6a 100644
--- a/BitFaster.Caching/ScopedCache.cs
+++ b/BitFaster.Caching/ScopedCache.cs
@@ -41,6 +41,7 @@ public ScopedCache(ICache> cache)
///
public ICacheEvents> Events => this.cache.Events;
+ ///
public CachePolicy Policy => this.cache.Policy;
///