public static File getDefaultUserCacheDir(ApplicationProperties applicationProperties)
			throws FileNotFoundException, IOException {

		String appName = normalizeApplicationName(applicationProperties.getApplicationName());

		// Look for Ghidra-specific system property
		File cacheOverrideDir = getSystemPropertyFile(PROPERTY_CACHE_DIR, false);
		if (cacheOverrideDir != null) {
			return createDir(
				new File(cacheOverrideDir, getUserSpecificDirName(cacheOverrideDir, appName)));
		}

		// Look for XDG environment variable
		File xdgCacheHomeDir = getEnvFile(XdgUtils.XDG_CACHE_HOME, false);
		if (xdgCacheHomeDir != null) {
			return createDir(
				new File(xdgCacheHomeDir, getUserSpecificDirName(xdgCacheHomeDir, appName)));
		}
		
		// Use platform-specific default location
		String userDirName = SystemUtilities.getUserName() + "-" + appName;

		try {
			return createDir(switch (OperatingSystem.CURRENT_OPERATING_SYSTEM) {
				case WINDOWS -> new File(getEnvFile("LOCALAPPDATA", true), appName);
				case LINUX -> new File("/var/tmp/" + userDirName);
				case FREE_BSD -> new File("/var/tmp/" + userDirName);
				case MAC_OS_X -> new File("/var/tmp/" + userDirName);
				default -> throw new FileNotFoundException(
					"Failed to find the user cache directory: Unsupported operating system.");
			});
		}
		catch (IOException e) {
			// Failed to create desired cache directory...use temp directory instead
			return getDefaultUserTempDir(applicationProperties.getApplicationName());
		}
	}
Gets the application's default user cache directory.
<p>
NOTE: This method creates the directory if it does not exist.

@param applicationProperties The application properties.
@return The application's default user cache directory. The returned {@link File} will 
  represent an absolute path.
@throws FileNotFoundException if the absolute path of the user cache directory could not be 
  determined.
@throws IOException if the user cache directory could not be created.
Ghidra/Framework/Utility/src/main/java/utility/application/ApplicationUtilities.java