优化代码

This commit is contained in:
GoEdgeLab
2024-01-19 09:27:42 +08:00
parent ac11a19604
commit 8b3e6aafa8
2 changed files with 86 additions and 42 deletions

View File

@@ -400,7 +400,19 @@ func (this *MemoryList) IncreaseHit(hash string) error {
return nil
}
func (this *MemoryList) print(t *testing.T) {
func (this *MemoryList) Prefixes() []string {
return this.prefixes
}
func (this *MemoryList) ItemMaps() map[string]map[string]*Item {
return this.itemMaps
}
func (this *MemoryList) PurgeIndex() int {
return this.purgeIndex
}
func (this *MemoryList) Print(t *testing.T) {
this.locker.Lock()
for _, itemMap := range this.itemMaps {
if len(itemMap) > 0 {