cacheScaled saves in the image handler's cache the scaled image bytes in thumbBytes, and puts its blobref in the scaledImage under the key name.
(ctx context.Context, thumbBytes []byte, name string)
| 114 | // cacheScaled saves in the image handler's cache the scaled image bytes |
| 115 | // in thumbBytes, and puts its blobref in the scaledImage under the key name. |
| 116 | func (ih *ImageHandler) cacheScaled(ctx context.Context, thumbBytes []byte, name string) error { |
| 117 | br, err := writeToCache(ctx, ih.Cache, thumbBytes, name) |
| 118 | if err != nil { |
| 119 | return err |
| 120 | } |
| 121 | ih.ThumbMeta.Put(name, br) |
| 122 | return nil |
| 123 | } |
| 124 | |
| 125 | // cached returns a FileReader for the given blobref, which may |
| 126 | // point to either a blob representing the entire thumbnail (max |
no test coverage detected