public String getProxyUrl(String url, boolean allowCachedFileUri) {
        if (allowCachedFileUri && getCacheFile(url).exists()) {
            File cacheFile = getCacheFile(url);
            touchFileSafely(cacheFile);
            return Uri.fromFile(cacheFile).toString();
        }
        return appendToProxyUrl(url);
    }
Returns url that wrap original url and should be used for client (MediaPlayer, ExoPlayer, etc).
<p>
If parameter {@code allowCachedFileUri} is {@code true} and file for this url is fully cached
(it means method {@link #isCached(String)} returns {@code true}) then file:// uri to cached file will be returned.

@param url                a url to file that should be cached.
@param allowCachedFileUri {@code true} if allow to return file:// uri if url is fully cached
@return a wrapped by proxy url if file is not fully cached or url pointed to cache file otherwise (if {@code allowCachedFileUri} is {@code true}).
dkplayer-videocache/src/main/java/com/danikula/videocache/HttpProxyCacheServer.java