@@ -36,7 +36,7 @@ func NewLastCommitCache(repoPath string, gitRepo *git.Repository, ttl int64) *La
36
36
37
37
// Get get the last commit information by commit id and entry path
38
38
func (c LastCommitCache ) Get (ref , entryPath string ) (* object.Commit , error ) {
39
- v := c .Cache .Get (fmt .Sprintf ("lastcommit :%s:%s:%s" , c .repoPath , ref , entryPath ))
39
+ v := c .Cache .Get (fmt .Sprintf ("last_commit :%s:%s:%s" , c .repoPath , ref , entryPath ))
40
40
if vs , ok := v .(string ); ok {
41
41
log .Trace ("LastCommitCache hit level 1: [%s:%s:%s]" , ref , entryPath , vs )
42
42
if commit , ok := c .commitCache [vs ]; ok {
@@ -60,5 +60,5 @@ func (c LastCommitCache) Get(ref, entryPath string) (*object.Commit, error) {
60
60
// Put put the last commit id with commit and entry path
61
61
func (c LastCommitCache ) Put (ref , entryPath , commitID string ) error {
62
62
log .Trace ("LastCommitCache save: [%s:%s:%s]" , ref , entryPath , commitID )
63
- return c .Cache .Put (fmt .Sprintf ("lastcommit :%s:%s:%s" , c .repoPath , ref , entryPath ), commitID , c .ttl )
63
+ return c .Cache .Put (fmt .Sprintf ("last_commit :%s:%s:%s" , c .repoPath , ref , entryPath ), commitID , c .ttl )
64
64
}
0 commit comments