Skip to content

Commit bc9fe8c

Browse files
authored
docs (#169)
1 parent b0021ed commit bc9fe8c

File tree

9 files changed

+32
-0
lines changed

9 files changed

+32
-0
lines changed

BitFaster.Caching/CachePolicy.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66

77
namespace BitFaster.Caching
88
{
9+
/// <summary>
10+
/// Represents the cache policy. Cache policy is dependent on the parameters chosen
11+
/// when constructing the cache.
12+
/// </summary>
913
public class CachePolicy
1014
{
1115
public CachePolicy(IBoundedPolicy eviction, ITimePolicy expireAfterWrite)
@@ -14,8 +18,16 @@ public CachePolicy(IBoundedPolicy eviction, ITimePolicy expireAfterWrite)
1418
this.ExpireAfterWrite = expireAfterWrite;
1519
}
1620

21+
/// <summary>
22+
/// Gets the bounded size eviction policy. This policy evicts items from the cache
23+
/// if it exceeds capacity.
24+
/// </summary>
1725
public IBoundedPolicy Eviction { get; }
1826

27+
/// <summary>
28+
/// Gets the expire after write policy, if any. This policy evicts items after a
29+
/// fixed duration since an entry's creation or most recent replacement.
30+
/// </summary>
1931
public ITimePolicy ExpireAfterWrite { get; }
2032
}
2133
}

BitFaster.Caching/IAsyncCache.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ public interface IAsyncCache<K, V> : IEnumerable<KeyValuePair<K, V>>
2828
/// </summary>
2929
ICacheEvents<K, V> Events { get; }
3030

31+
/// <summary>
32+
/// Gets the cache policy.
33+
/// </summary>
3134
CachePolicy Policy { get; }
3235

3336
/// <summary>

BitFaster.Caching/IBoundedPolicy.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
namespace BitFaster.Caching
88
{
9+
/// <summary>
10+
/// Represents a bounded size cache policy.
11+
/// </summary>
912
public interface IBoundedPolicy
1013
{
1114
/// <summary>

BitFaster.Caching/ICache.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ public interface ICache<K, V> : IEnumerable<KeyValuePair<K, V>>
3333
/// </summary>
3434
ICacheEvents<K, V> Events { get; }
3535

36+
/// <summary>
37+
/// Gets the cache policy.
38+
/// </summary>
3639
CachePolicy Policy { get; }
3740

3841
/// <summary>

BitFaster.Caching/IScopedAsyncCache.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ public interface IScopedAsyncCache<K, V> : IEnumerable<KeyValuePair<K, Scoped<V>
3232
/// </remarks>
3333
ICacheEvents<K, Scoped<V>> Events { get; }
3434

35+
/// <summary>
36+
/// Gets the cache policy.
37+
/// </summary>
3538
CachePolicy Policy { get; }
3639

3740
/// <summary>

BitFaster.Caching/IScopedCache.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ public interface IScopedCache<K, V> : IEnumerable<KeyValuePair<K, Scoped<V>>> wh
3737
/// </remarks>
3838
ICacheEvents<K, Scoped<V>> Events { get; }
3939

40+
/// <summary>
41+
/// Gets the cache policy.
42+
/// </summary>
4043
CachePolicy Policy { get; }
4144

4245
/// <summary>

BitFaster.Caching/ITimePolicy.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
namespace BitFaster.Caching
88
{
9+
/// <summary>
10+
/// Represents a time based cache policy.
11+
/// </summary>
912
public interface ITimePolicy
1013
{
1114
/// <summary>

BitFaster.Caching/ScopedAsyncCache.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public ScopedAsyncCache(IAsyncCache<K, Scoped<V>> cache)
3838
///<inheritdoc/>
3939
public ICacheEvents<K, Scoped<V>> Events => this.cache.Events;
4040

41+
///<inheritdoc/>
4142
public CachePolicy Policy => this.cache.Policy;
4243

4344
///<inheritdoc/>

BitFaster.Caching/ScopedCache.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public ScopedCache(ICache<K, Scoped<V>> cache)
4141
///<inheritdoc/>
4242
public ICacheEvents<K, Scoped<V>> Events => this.cache.Events;
4343

44+
///<inheritdoc/>
4445
public CachePolicy Policy => this.cache.Policy;
4546

4647
///<inheritdoc/>

0 commit comments

Comments
 (0)