mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-26 12:27:06 +00:00 
			
		
		
		
	Cache last commit to accelerate the repository directory page visit (#10069)
* Cache last commit to accelerate the repository directory page visit * Default use default cache configuration * add tests for last commit cache * Simplify last commit cache * Revert Enabled back * Change the last commit cache default ttl to 8760h * Fix test
This commit is contained in:
		| @@ -4,8 +4,10 @@ | ||||
|  | ||||
| package git | ||||
|  | ||||
| import "gopkg.in/src-d/go-git.v4/plumbing/object" | ||||
|  | ||||
| // LastCommitCache cache | ||||
| type LastCommitCache interface { | ||||
| 	Get(repoPath, ref, entryPath string) (*Commit, error) | ||||
| 	Put(repoPath, ref, entryPath string, commit *Commit) error | ||||
| 	Get(ref, entryPath string) (*object.Commit, error) | ||||
| 	Put(ref, entryPath, commitID string) error | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Lunny Xiao
					Lunny Xiao