HasFreeSpaceForHotItems 是否有足够的空间提供给热门内容
()
| 424 | |
| 425 | // HasFreeSpaceForHotItems 是否有足够的空间提供给热门内容 |
| 426 | func (this *MemoryStorage) HasFreeSpaceForHotItems() bool { |
| 427 | return atomic.LoadInt64(&this.usedSize) < this.memoryCapacityBytes()*3/4 |
| 428 | } |
| 429 | |
| 430 | // 计算Key Hash |
| 431 | func (this *MemoryStorage) hash(key string) uint64 { |
no test coverage detected