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

Commit 59c5a8c

Browse files
author
Andreia Gaita
authored
Merge pull request #834 from github-for-unity/fixes/enable-lfs-polling
Enable lfs polling by regularly triggering a cache invalidation
2 parents 76b19f7 + 1b64943 commit 59c5a8c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/GitHub.Api/Git/Repository.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,12 @@ public void Refresh(CacheType cacheType)
188188
{
189189
var cache = cacheContainer.GetCache(cacheType);
190190
cache.InvalidateData();
191+
192+
// take the opportunity to possibly refresh the locks cache, if it has timed out
193+
if (cacheType != CacheType.GitLocks)
194+
{
195+
cacheContainer.GetCache(CacheType.GitLocks).ValidateData();
196+
}
191197
}
192198

193199
private void CacheHasBeenInvalidated(CacheType cacheType)

0 commit comments

Comments
 (0)