@@ -13,6 +13,10 @@ public sealed class AtomicFactoryScopedAsyncCache<K, V> : IScopedAsyncCache<K, V
1313 private readonly ICache < K , ScopedAsyncAtomicFactory < K , V > > cache ;
1414 private readonly Optional < ICacheEvents < K , Scoped < V > > > events ;
1515
16+ /// <summary>
17+ /// Initializes a new instance of the AtomicFactoryScopedAsyncCache class with the specified inner cache.
18+ /// </summary>
19+ /// <param name="cache">The decorated cache.</param>
1620 public AtomicFactoryScopedAsyncCache ( ICache < K , ScopedAsyncAtomicFactory < K , V > > cache )
1721 {
1822 if ( cache == null )
@@ -31,27 +35,34 @@ public AtomicFactoryScopedAsyncCache(ICache<K, ScopedAsyncAtomicFactory<K, V>> c
3135 }
3236 }
3337
38+ ///<inheritdoc/>
3439 public int Count => this . cache . Count ;
3540
41+ ///<inheritdoc/>
3642 public Optional < ICacheMetrics > Metrics => this . cache . Metrics ;
3743
44+ ///<inheritdoc/>
3845 public Optional < ICacheEvents < K , Scoped < V > > > Events => this . events ;
3946
47+ ///<inheritdoc/>
4048 public CachePolicy Policy => this . cache . Policy ;
4149
4250 ///<inheritdoc/>
4351 public ICollection < K > Keys => this . cache . Keys ;
4452
53+ ///<inheritdoc/>
4554 public void AddOrUpdate ( K key , V value )
4655 {
4756 this . cache . AddOrUpdate ( key , new ScopedAsyncAtomicFactory < K , V > ( value ) ) ;
4857 }
4958
59+ ///<inheritdoc/>
5060 public void Clear ( )
5161 {
5262 this . cache . Clear ( ) ;
5363 }
5464
65+ ///<inheritdoc/>
5566 public async ValueTask < Lifetime < V > > ScopedGetOrAddAsync ( K key , Func < K , Task < Scoped < V > > > valueFactory )
5667 {
5768 int c = 0 ;
@@ -76,6 +87,7 @@ public async ValueTask<Lifetime<V>> ScopedGetOrAddAsync(K key, Func<K, Task<Scop
7687 }
7788 }
7889
90+ ///<inheritdoc/>
7991 public bool ScopedTryGet ( K key , out Lifetime < V > lifetime )
8092 {
8193 if ( this . cache . TryGet ( key , out var scope ) )
@@ -90,16 +102,19 @@ public bool ScopedTryGet(K key, out Lifetime<V> lifetime)
90102 return false ;
91103 }
92104
105+ ///<inheritdoc/>
93106 public bool TryRemove ( K key )
94107 {
95108 return this . cache . TryRemove ( key ) ;
96109 }
97110
111+ ///<inheritdoc/>
98112 public bool TryUpdate ( K key , V value )
99113 {
100114 return this . cache . TryUpdate ( key , new ScopedAsyncAtomicFactory < K , V > ( value ) ) ;
101115 }
102116
117+ ///<inheritdoc/>
103118 public IEnumerator < KeyValuePair < K , Scoped < V > > > GetEnumerator ( )
104119 {
105120 foreach ( var kvp in this . cache )
0 commit comments