docs: public static File getCacheDirectory(Context context, boolean preferExternal) {
  		File appCacheDir = null;
  		String externalStorageState;
  		try {
  			externalStorageState = Environment.getExternalStorageState();
  		} catch (NullPointerException e) { // (sh)it happens (Issue #660)
  			externalStorageState = "";
  		} catch (IncompatibleClassChangeError e) { // (sh)it happens too (Issue #989)
  			externalStorageState = "";
  		}
  		if (preferExternal && MEDIA_MOUNTED.equals(externalStorageState) && hasExternalStoragePermission(context)) {
  			appCacheDir = getExternalCacheDir(context);
  		}
  		if (appCacheDir == null) {
  			appCacheDir = context.getCacheDir();
  		}
  		if (appCacheDir == null) {
  			String cacheDirPath = "/data/data/" + context.getPackageName() + "/cache/";
  			L.w("Can't define system cache directory! '%s' will be used.", cacheDirPath);
  			appCacheDir = new File(cacheDirPath);
  		}
  		return appCacheDir;
  	}