Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 13cd10e

Browse files
committed
Clean up a tad
1 parent 371483b commit 13cd10e

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/GitHub.App/Extensions/AkavacheExtensions.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -208,21 +208,17 @@ static IObservable<T> GetAndFetchLatestFromIndex<T>(this IBlobCache This,
208208
.Where(predicateIsTrue => predicateIsTrue.Item2)
209209
.Select(x => x.Item1)
210210
.Select(index => index.Clear())
211-
.SelectMany(index =>
212-
{
213-
var fetchObs = fetchFunc()
211+
.SelectMany(index => fetchFunc()
214212
.Catch<T, Exception>(ex =>
215213
{
216214
var shouldInvalidate = shouldInvalidateOnError ?
217215
This.InvalidateObject<CacheIndex>(key) :
218216
Observable.Return(Unit.Default);
219217
return shouldInvalidate.SelectMany(__ => Observable.Throw<T>(ex));
220-
});
221-
222-
return fetchObs
218+
})
223219
.SelectMany(x => x.Save<T>(This, key, absoluteExpiration))
224-
.Do(x => index.Add(key, x));
225-
});
220+
.Do(x => index.Add(key, x))
221+
);
226222

227223
var cache = idx
228224
.SelectMany(index => This.GetObjects<T>(index.Keys.ToList()))

0 commit comments

Comments
 (0)