Repository navigation
IMG-140: c2pa docs, source cache docs - #16
gzigzigzeo wants to merge 5 commits into
Conversation
✅ Deploy Preview for imgproxy-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
|
||
| ### Source image caching | ||
|
|
||
| In addition to caching processed results, imgproxy can cache the raw bytes of downloaded source images. Set `IMGPROXY_CACHE_SOURCE_ENABLE` to `true` to enable it. This is useful when you request the same source image with many different processing options. Instead of re-downloading the source for every variant, imgproxy fetches it once and serves subsequent requests from the cache. |
There was a problem hiding this comment.
I'd put it another way:
| In addition to caching processed results, imgproxy can cache the raw bytes of downloaded source images. Set `IMGPROXY_CACHE_SOURCE_ENABLE` to `true` to enable it. This is useful when you request the same source image with many different processing options. Instead of re-downloading the source for every variant, imgproxy fetches it once and serves subsequent requests from the cache. | |
| If you process remote images, like ones from third-party HTTP sources, you may want to cache source images in your storage to keep them close to imgproxy. You can enable source image caching by setting `IMGPROXY_CACHE_SOURCE_ENABLE` to `true`. This way, imgproxy will cache the source image on the first transformation and fetch it from the cache for subsequent ones. |
There was a problem hiding this comment.
Done, including grammarly corrections
|
|
||
| Each tag can be up to 256 characters long and must consist of visible ASCII characters (character codes 33-126), excluding commas. We consider at most 50 tags per request; any beyond that are silently dropped. | ||
|
|
||
| The tags are also written to the response headers, so a CDN in front of imgproxy can use them for tag-based cache invalidation. Use the [`IMGPROXY_CACHE_TAGS_FORMAT`](../configuration/options.mdx#IMGPROXY_CACHE_TAGS_FORMAT) config to choose which format(s) the tags are written in — [CloudFront](https://aws.amazon.com/blogs/networking-and-content-delivery/manage-caches-with-precision-using-amazon-cloudfront-invalidation-by-cache-tag/), [Cloudflare](https://developers.cloudflare.com/cache/how-to/purge-cache/purge-by-tags/), both (the default), or neither. |
There was a problem hiding this comment.
I'd either remove the formats list from here or copy the accepted values list from the configuration docs. As it is now, the reader will need to check the configuration docs anyway.
There was a problem hiding this comment.
Ok, removed formats.
| imgproxy Pro can bypass the internal cache for a single request using the [bypass_cache](../usage/processing.mdx#bypass-cache) processing option: | ||
|
|
||
| ```imgproxy_url_option | ||
| bypass_cache:%bypass |
There was a problem hiding this comment.
The second argument is missing. Also, we need to add it to the processing.info options docs.
| ``` | ||
|
|
||
| When set to `1`, `t` or `true`, imgproxy will bypass the internal cache and do all the processing and fetching from the source image. | ||
| When set to `1`, `t`, or `true`, imgproxy bypasses the internal cache entirely. When set to `1:0`, only the processing cache is bypassed. When set to `0:1`, only the source cache is bypassed. |
There was a problem hiding this comment.
| When set to `1`, `t`, or `true`, imgproxy bypasses the internal cache entirely. When set to `1:0`, only the processing cache is bypassed. When set to `0:1`, only the source cache is bypassed. | |
| Allows bypassing imgproxy's internal cache. | |
| * `bypass`: when set to `1`, `t`, or `true`, imgproxy bypasses the internal cache entirely. | |
| * `bypass_source`: _(optional)_ defines if imgproxy should bypass source image cache. When not set, its value is equal to `bypass`. When `bypass` is truthy, but `bypass_source` is not (e.g., `1:0`), imgproxy will bypass the results cache but not the source cache. When `bypass_source` is truthy, but `bypass` is not (e.g., `0:1`), imgproxy will bypass the source cache but not the results cache. | |
| Default: `0:0` |
There was a problem hiding this comment.
We should also do the same for the getting info docs
| Requires [`IMGPROXY_ALLOW_BYPASS_CACHE`](../configuration/options.mdx#IMGPROXY_ALLOW_BYPASS_CACHE) set to `true`. `bypass_source` is optional, and equals to `bypass` if not specified, hence, when only `bypass` is set, both processing and source cache are ignored. | ||
|
|
||
| Default: `0:0` |
There was a problem hiding this comment.
I guess it's better to copy the arguments description from the processing options docs
No description provided.