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:
parent
046bb05979
commit
ce7062a422
10 changed files with 273 additions and 23 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue