use of com.facebook.cache.common.CacheKey in project BigImageViewer by Piasy.
the class FrescoImageLoader method getCacheFile.
private File getCacheFile(final ImageRequest request) {
FileCache mainFileCache = ImagePipelineFactory.getInstance().getMainFileCache();
final CacheKey cacheKey = DefaultCacheKeyFactory.getInstance().getEncodedCacheKey(request, // we don't need context, but avoid null
false);
File cacheFile = request.getSourceFile();
// http://crashes.to/s/ee10638fb31
if (mainFileCache.hasKey(cacheKey) && mainFileCache.getResource(cacheKey) != null) {
cacheFile = ((FileBinaryResource) mainFileCache.getResource(cacheKey)).getFile();
}
return cacheFile;
}
Aggregations