mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-16 05:02:09 +02:00
fix: git cache (#38763)
1. always use "last commit cache" 2. correctly build the cache key for any input (SafeCacheKey) 3. fix the git note "last commit cache FIXME" and avoid OOM
This commit is contained in:
1 parent
6347a33b34
commit
deccd53c24
26 files changed
+213
-298
No files matched your search
@@ -11,9 +11,6 @@ import (
|
||||
|
||||
// CacheCommit will cache the commit from the gitRepository
|
||||
func (c *Commit) CacheCommit(ctx context.Context, gitRepo *Repository) error {
|
||||
if gitRepo.LastCommitCache == nil {
|
||||
return nil
|
||||
}
|
||||
return c.recursiveCache(ctx, gitRepo, c.Tree(), "", 1)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user