From d1997613898022a7cd7e1dbb65b442519ef04582 Mon Sep 17 00:00:00 2001 From: Peter Abbondanzo Date: Thu, 31 Oct 2024 17:11:30 -0400 Subject: [PATCH 1/2] Update cache control docs --- docs/images.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/images.md b/docs/images.md index 1afecdecdb7..154ea9f29f3 100644 --- a/docs/images.md +++ b/docs/images.md @@ -150,14 +150,14 @@ This is recommended for very small and dynamic images only, like icons in a list /> ``` -### Cache Control (iOS Only) +### Cache Control In some cases you might only want to display an image if it is already in the local cache, i.e. a low resolution placeholder until a higher resolution is available. In other cases you do not care if the image is outdated and are willing to display an outdated image to save bandwidth. The `cache` source property gives you control over how the network layer interacts with the cache. - `default`: Use the native platforms default strategy. - `reload`: The data for the URL will be loaded from the originating source. No existing cache data should be used to satisfy a URL load request. -- `force-cache`: The existing cached data will be used to satisfy the request, regardless of its age or expiration date. If there is no existing data in the cache corresponding the request, the data is loaded from the originating source. -- `only-if-cached`: The existing cache data will be used to satisfy a request, regardless of its age or expiration date. If there is no existing data in the cache corresponding to a URL load request, no attempt is made to load the data from the originating source, and the load is considered to have failed. +- `force-cache`: (iOS only) The existing cached data will be used to satisfy the request, regardless of its age or expiration date. If there is no existing data in the cache corresponding the request, the data is loaded from the originating source. +- `only-if-cached`: (iOS only) The existing cache data will be used to satisfy a request, regardless of its age or expiration date. If there is no existing data in the cache corresponding to a URL load request, no attempt is made to load the data from the originating source, and the load is considered to have failed. ```tsx Date: Thu, 31 Oct 2024 17:19:08 -0400 Subject: [PATCH 2/2] Update anchor link for cache control --- docs/image.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/image.md b/docs/image.md index 7e726dd4ece..b721a26bd37 100644 --- a/docs/image.md +++ b/docs/image.md @@ -387,7 +387,7 @@ If you have a source image with dimensions 200x200 and destination dimensions of The image source (either a remote URL or a local file resource). -This prop can also contain several remote URLs, specified together with their width and height and potentially with scale/other URI arguments. The native side will then choose the best `uri` to display based on the measured size of the image container. A `cache` property can be added to control how networked request interacts with the local cache. (For more information see [Cache Control for Images](images#cache-control-ios-only)). +This prop can also contain several remote URLs, specified together with their width and height and potentially with scale/other URI arguments. The native side will then choose the best `uri` to display based on the measured size of the image container. A `cache` property can be added to control how networked request interacts with the local cache. (For more information see [Cache Control for Images](images#cache-control)). The currently supported formats are `png`, `jpg`, `jpeg`, `bmp`, `gif`, `webp`, `psd` (iOS only). In addition, iOS supports several RAW image formats. Refer to Apple's documentation for the current list of supported camera models (for iOS 12, see https://support.apple.com/en-ca/HT208967).