(key string)
| 65 | } |
| 66 | |
| 67 | func (c *imageResponseCache) get(key string) (*imageResponseCacheEntry, bool) { |
| 68 | if c == nil { |
| 69 | return nil, false |
| 70 | } |
| 71 | c.mu.Lock() |
| 72 | defer c.mu.Unlock() |
| 73 | |
| 74 | return c.items.Get(key) |
| 75 | } |
| 76 | |
| 77 | func (c *imageResponseCache) put(key string, contentType string, etag string, xImgddSI string, body []byte) { |
| 78 | if c == nil || int64(len(body)) > c.maxFileBytes { |