You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: manager.go
    path of file: ./repos/harbor/src/pkg/cached/artifact/redis
    
    the code of the file until where you have to start completion: // Copyright Project Harbor Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//    http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific l
    
func (m *Manager) refreshCache(ctx context.Context, art *artifact.Artifact) {
	// refreshCache used for UpdatePullTime, because we have a background goroutine to
	// update per artifact pull_time in period time, in that case, we don't want to lose
	// cache every fixed interval, so prefer to use refreshCache instead of cleanUp.
	// no need to consider lock because we only have one goroutine do this work one by one.

	// refreshCache includes 2 steps:
	//   1. cleanUp
	//   2. re-get
	m.cleanUp(ctx, art)

	var err error
	// re-get by id
	_, err = m.Get(ctx, art.ID)
	if err != nil {
		log.Errorf("refresh cache by artifact id %d error: %v", art.ID, err)
	}
	// re-get by digest
	_, err = m.GetByDigest(ctx, art.RepositoryName, art.Digest)
	if err != nil {
		log.Errorf("refresh cache by artifact digest %s error: %v", art.Digest, err)
	}
}