MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / HasFreeSpaceForHotItems

Method HasFreeSpaceForHotItems

internal/caches/storage_memory.go:426–428  ·  view source on GitHub ↗

HasFreeSpaceForHotItems 是否有足够的空间提供给热门内容

()

Source from the content-addressed store, hash-verified

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

Callers 1

hotLoopMethod · 0.80

Calls 1

memoryCapacityBytesMethod · 0.95

Tested by

no test coverage detected