-
Notifications
You must be signed in to change notification settings - Fork 0
Description
The feature request is to add an interceptor functionality to the react-native-reverse-proxy package, which would enable conditional request forwarding based on the availability of cached content. The goal is to check if a requested video already exists in cache, and if so, to serve it directly from the cache instead of fetching it from the original source.
Proposed Functionality:
-
Request Interception with Cache Check: The interceptor should examine each request and determine if the requested video file exists in the cache.
-
Conditional Forwarding: If the video is found in cache, serve it from there; otherwise, forward the request to the original source.
-
Response Caching: Optionally, provide support for caching responses of specific requests to speed up subsequent accesses.
Use Case:
Optimized Video Playback: If the video exists in cache, serve it directly from the device, reducing bandwidth usage and load times. This is particularly useful for applications dealing with large video files or frequent video replays.
This functionality would improve app performance by leveraging local cache for repeated requests, enhancing user experience with faster load times and reduced data usage.