@@ -36,7 +36,7 @@ func NewLastCommitCache(repoPath string, gitRepo *git.Repository, ttl int64) *La
3636
3737// Get get the last commit information by commit id and entry path
3838func (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 ))
4040 if vs , ok := v .(string ); ok {
4141 log .Trace ("LastCommitCache hit level 1: [%s:%s:%s]" , ref , entryPath , vs )
4242 if commit , ok := c .commitCache [vs ]; ok {
@@ -60,5 +60,5 @@ func (c LastCommitCache) Get(ref, entryPath string) (*object.Commit, error) {
6060// Put put the last commit id with commit and entry path
6161func (c LastCommitCache ) Put (ref , entryPath , commitID string ) error {
6262 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 )
6464}
0 commit comments