Skip to content

Commit

Permalink
cache: remove unnecessary stagePath interface of CacheManager (#5545)
Browse files Browse the repository at this point in the history
Signed-off-by: Changxin Miao <miaochangxin@step.ai>
  • Loading branch information
polyrabbit authored Jan 10, 2025
1 parent 7d3ecd4 commit 5714660
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
9 changes: 0 additions & 9 deletions pkg/chunk/disk_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,6 @@ type CacheManager interface {
uploaded(key string, size int)
stage(key string, data []byte, keepCache bool) (string, error)
removeStage(key string) error
stagePath(key string) string
stats() (int64, int64)
usedMemory() int64
isEmpty() bool
Expand Down Expand Up @@ -1248,14 +1247,6 @@ func (m *cacheManager) stage(key string, data []byte, keepCache bool) (string, e
return "", errors.New("no available cache dir")
}

func (m *cacheManager) stagePath(key string) string {
store := m.getStore(key)
if store != nil {
return store.stagePath(key)
}
return ""
}

func (m *cacheManager) uploaded(key string, size int) {
store := m.getStore(key)
if store != nil {
Expand Down
1 change: 0 additions & 1 deletion pkg/chunk/mem_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,5 @@ func (c *memcache) stage(key string, data []byte, keepCache bool) (string, error
return "", errors.New("not supported")
}
func (c *memcache) uploaded(key string, size int) {}
func (c *memcache) stagePath(key string) string { return "" }
func (c *memcache) isEmpty() bool { return false }
func (c *memcache) getMetrics() *cacheManagerMetrics { return c.metrics }

0 comments on commit 5714660

Please sign in to comment.