| 463 | |
| 464 | if (best_idx >= 0 && record_hit) |
| 465 | record_inline_hit(best_slot, best_len, prompt_ids.size()); |
| 466 | return {best_slot, best_len}; |
| 467 | } |
| 468 | |
| 469 | void PrefixCache::record_inline_hit( |
| 470 | int slot, int prefix_len, size_t prompt_len) { |
| 471 | for (int i = 0; i < (int)entries_.size(); ++i) { |
| 472 | if (entries_[(size_t)i].slot != slot || |
| 473 | (int)entries_[(size_t)i].ids.size() != prefix_len) continue; |
no outgoing calls