isCached takes the header of chunk data and see if it's been cached. If not, it caches it.
(header string)
| 145 | // isCached takes the header of chunk data and see if it's been cached. |
| 146 | // If not, it caches it. |
| 147 | func (d *Decoder) isCached(header string) bool { |
| 148 | if _, ok := d.cache[header]; ok { |
| 149 | return true |
| 150 | } |
| 151 | |
| 152 | // cache it |
| 153 | d.cache[header] = struct{}{} |
| 154 | return false |
| 155 | } |