diff --git a/Libraries/Image/RCTImageLoader.h b/Libraries/Image/RCTImageLoader.h index 4fbb1cb7222a9a..3b775a69bcaf27 100644 --- a/Libraries/Image/RCTImageLoader.h +++ b/Libraries/Image/RCTImageLoader.h @@ -198,3 +198,25 @@ typedef dispatch_block_t RCTImageLoaderCancellationBlock; - (float)decoderPriority; @end + + +/** + * Provides an interface to use for providing a image caching strategy. + */ + +@protocol RCTImageCacheDelegate + +- (UIImage *)imageForUrl:(NSString *)url + size:(CGSize)size + scale:(CGFloat)scale + resizeMode:(RCTResizeMode)resizeMode + responseDate:(NSString *)responseDate; + +- (void)addImageToCache:(UIImage *)image + URL:(NSString *)url + size:(CGSize)size + scale:(CGFloat)scale + resizeMode:(RCTResizeMode)resizeMode + responseDate:(NSString *)responseDate; + +@end