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

Commit 24be3ee

Browse files
committed
DataTimeout should never be infinite, otherwise invalid data will never be fixed
1 parent fbff071 commit 24be3ee

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/UnityExtension/Assets/Editor/GitHub.Unity/ApplicationCache.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -501,10 +501,7 @@ public GitBranch? CurrentGitBranch
501501
}
502502
}
503503

504-
public override TimeSpan DataTimeout
505-
{
506-
get { return TimeSpan.MaxValue; }
507-
}
504+
public override TimeSpan DataTimeout { get { return TimeSpan.FromDays(1); } }
508505
}
509506

510507
[Location("cache/branches.yaml", LocationAttribute.Location.LibraryFolder)]
@@ -740,7 +737,7 @@ public void SetLocals(Dictionary<string, ConfigBranch> branchDictionary)
740737
public ILocalConfigBranchDictionary LocalConfigBranches { get { return localConfigBranches; } }
741738
public IRemoteConfigBranchDictionary RemoteConfigBranches { get { return remoteConfigBranches; } }
742739
public IConfigRemoteDictionary ConfigRemotes { get { return configRemotes; } }
743-
public override TimeSpan DataTimeout { get { return TimeSpan.MaxValue; } }
740+
public override TimeSpan DataTimeout { get { return TimeSpan.FromDays(1); } }
744741
}
745742

746743
[Location("cache/gitlog.yaml", LocationAttribute.Location.LibraryFolder)]

src/UnityExtension/Assets/Editor/GitHub.Unity/CacheContainer.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public void Validate(CacheType cacheType)
5959

6060
public void ValidateAll()
6161
{
62+
RepositoryInfoCache.ValidateData();
6263
BranchCache.ValidateData();
6364
GitLogCache.ValidateData();
6465
GitTrackingStatusCache.ValidateData();
@@ -73,6 +74,7 @@ public void Invalidate(CacheType cacheType)
7374

7475
public void InvalidateAll()
7576
{
77+
RepositoryInfoCache.InvalidateData();
7678
BranchCache.InvalidateData();
7779
GitLogCache.InvalidateData();
7880
GitTrackingStatusCache.InvalidateData();

0 commit comments

Comments
 (0)