| 34 | namespace bytedance::bolt::cache { |
| 35 | |
| 36 | void SsdFileTracker::fileTouched(int32_t totalEntries) { |
| 37 | ++numTouches_; |
| 38 | if (numTouches_ > kDecayInterval && numTouches_ > totalEntries / 2) { |
| 39 | numTouches_ = 0; |
| 40 | for (auto& score : regionScores_) { |
| 41 | score = (score * 15) / 16; |
| 42 | } |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | void SsdFileTracker::regionFilled(int32_t region) { |
| 47 | const uint64_t best = |