/// <summary> /// Set the img optimizer cache file. If pass by user by cmd line, use that. Otherwise use our subdir in the user's AppData dir. /// Ensure the directory exists. /// </summary> protected void EnsureImgOptimizerCacheFileExists() { string logFile = !string.IsNullOrEmpty(_cmdLineOptions.OptimizerCacheFile) ? _cmdLineOptions.OptimizerCacheFile : Environment.ExpandEnvironmentVariables(@"%APPDATA%\LigerShark\AzureJobs\imageoptimizer-cache.xml"); _store = new FileHashStore(logFile); }