This repository was archived by the owner on Jun 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
src/GitHub.App/Extensions Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -138,6 +138,29 @@ static IObservable<byte[]> GetAndFetchLatestBytes(
138138 . RefCount ( ) ;
139139 }
140140
141+ /// <summary>
142+ /// This method attempts to return a series of cached value(s) aggregated by
143+ /// a <paramref name="key"/>. In the case of a
144+ /// cache miss the fetchFunc will be used to provide a fresh value which
145+ /// is then returned. In the case of a cache hit where the cache item is
146+ /// considered stale (but not expired) as determined by <paramref name="refreshInterval"/>
147+ /// the stale values will be produced first, followed by the fresh values
148+ /// when the fetch func completes.
149+ /// </summary>
150+ /// <param name="blobCache">The cache to retrieve the object from.</param>
151+ /// <param name="key">The key to look up the cache value with.</param>
152+ /// <param name="fetchFunc">The fetch function.</param>
153+ /// <param name="removedItemsCallback">The callback that receives items that
154+ /// were a part of the cache but not of the list list of values.</param>
155+ /// <param name="refreshInterval">
156+ /// Cache objects with an age exceeding this value will be treated as stale
157+ /// and the fetch function will be invoked to refresh it.
158+ /// </param>
159+ /// <param name="maxCacheDuration">
160+ /// The maximum age of a cache object before the object is treated as
161+ /// expired and unusable. Cache objects older than this will be treated
162+ /// as a cache miss.
163+ /// </param>
141164 public static IObservable < T > GetAndFetchLatestFromIndex < T > (
142165 this IBlobCache blobCache ,
143166 string key ,
You can’t perform that action at this time.
0 commit comments