Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 5388c25

Browse files
Fix to cache updating
After we get the invalidation event form the cache, the cache will not send another invalidation event until it gets a new data set. User should retrieve the data after it has been initialized if the cache has previously signaled the data is invalid.
1 parent 4d09872 commit 5388c25

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/GitHub.Api/Git/Repository.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,10 @@ public void Initialize(IGitClient client)
409409
Guard.ArgumentNotNull(client, nameof(client));
410410
gitClient = client;
411411
if (needsRefresh)
412-
cacheContainer.GitUserCache.InvalidateData();
412+
{
413+
needsRefresh = false;
414+
UpdateUserAndEmail();
415+
}
413416
}
414417

415418
public void SetNameAndEmail(string name, string email)

0 commit comments

Comments
 (0)