Package com.inmobi.ads.cache
Object WebResourceCacheManager
-
- All Implemented Interfaces:
public class WebResourceCacheManagerWebResourceCacheManager is responsible for managing web resource caching and intercepting requests for cached resources.
-
-
Field Summary
Fields Modifier and Type Field Description public final static WebResourceCacheManagerINSTANCE
-
Method Summary
Modifier and Type Method Description final Unitstart()Initializes all the dependent classes and Storage Layers before the call to intercept final WebResourceResponseshouldInterceptRequest(String urlRaw, InMobiLogger logger)Intercepts a request for the specified URL and returns the cached resource if available. final WebResourceResponseshouldInterceptRequest(WebResourceRequest request, InMobiLogger logger)Intercepts a request for the specified WebResourceRequest and returns the cached resource if available. final BooleanisCacheEnableFor(String url)-
-
Method Detail
-
start
final Unit start()
Initializes all the dependent classes and Storage Layers before the call to intercept
-
shouldInterceptRequest
final WebResourceResponse shouldInterceptRequest(String urlRaw, InMobiLogger logger)
Intercepts a request for the specified URL and returns the cached resource if available.
- Parameters:
urlRaw- The raw URL of the resource request.logger- Optional logger for logging debug messages.- Returns:
The cached web resource response, or null if not cached.
-
shouldInterceptRequest
@RequiresApi(value = 21)@WorkerThread() final WebResourceResponse shouldInterceptRequest(WebResourceRequest request, InMobiLogger logger)
Intercepts a request for the specified WebResourceRequest and returns the cached resource if available.
- Parameters:
request- The WebResourceRequest of the resource request.logger- Optional logger for logging debug messages.- Returns:
The cached web resource response, or null if not cached.
-
isCacheEnableFor
final Boolean isCacheEnableFor(String url)
-
-
-
-