fetch chunk and index by id
(id RequestID)
| 405 | |
| 406 | // fetch chunk and index by id |
| 407 | func (s *Storage) fetch(id RequestID) *Chunk { |
| 408 | index, exists := s.chunks[id] |
| 409 | if !exists { |
| 410 | return nil |
| 411 | } |
| 412 | chunk := s.buffers[index] |
| 413 | s.stack.Touch(chunk.item) |
| 414 | return chunk |
| 415 | } |