ShouldUseDiskCache 判断是否应该使用磁盘缓存
(dataSize int64)
| 165 | |
| 166 | // ShouldUseDiskCache 判断是否应该使用磁盘缓存 |
| 167 | func ShouldUseDiskCache(dataSize int64) bool { |
| 168 | if !IsDiskCacheEnabled() { |
| 169 | return false |
| 170 | } |
| 171 | threshold := GetDiskCacheThresholdBytes() |
| 172 | if dataSize < threshold { |
| 173 | return false |
| 174 | } |
| 175 | return IsDiskCacheAvailable(dataSize) |
| 176 | } |
no test coverage detected