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

Commit fab184a

Browse files
StanleyGoldmanshana
authored andcommitted
Adding a cache for the git log data
1 parent b3e05d6 commit fab184a

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,4 +166,27 @@ public bool IsFavourite(string branchName)
166166
return FavouriteBranches.Contains(branchName);
167167
}
168168
}
169+
170+
[Location("cache/gitlog.yaml", LocationAttribute.Location.LibraryFolder)]
171+
sealed class GitLogCache : ScriptObjectSingleton<GitLogCache>
172+
{
173+
[SerializeField] private List<GitLogEntry> log;
174+
public GitLogCache()
175+
{}
176+
177+
public List<GitLogEntry> Log
178+
{
179+
get
180+
{
181+
if (log == null)
182+
log = new List<GitLogEntry>();
183+
return log;
184+
}
185+
set
186+
{
187+
log = value;
188+
Save(true);
189+
}
190+
}
191+
}
169192
}

0 commit comments

Comments
 (0)