private static void createPicassoDiskCache(Context context,long maxSize) throws IOException {
  File httpCacheDir=new File(context.getCacheDir(),"picasso-cache");
  httpCacheDir.mkdirs();
  long freeDiskSpace=getFreeDiskSpace(httpCacheDir);
  maxSize=Math.min(maxSize,freeDiskSpace / 2);
  com.squareup.okhttp.Cache diskCache=new com.squareup.okhttp.Cache(httpCacheDir,maxSize);
  diskCache.initialize();
  picassoDiskCacheRef=new WeakReference<>(diskCache);
}

private static void createPicassoDiskCache ( Context context , long maxSize ) throws IOException { File httpCacheDir = new File ( context . getCacheDir ( ) , "picasso-cache" ) ; httpCacheDir . mkdirs ( ) ; long freeDiskSpace = getFreeDiskSpace ( httpCacheDir ) ; maxSize = Math . min ( maxSize , freeDiskSpace / 2 ) ; com . squareup . okhttp . Cache diskCache = new com . squareup . okhttp . Cache ( httpCacheDir , maxSize ) ; diskCache . initialize ( ) ; picassoDiskCacheRef = new WeakReference < > ( diskCache ) ; }
creates and initializes the disk cache used by picasso ' s okhttpdownloader with the specified size limited by half of the system ' s free space . this call accesses the disk and is expensive .
