AdaptiveImages.AdaptiveImageHandler.RefreshCache C# (CSharp) Метод

RefreshCache() приватный Метод

Deletes the cache_file if older than source_file
private RefreshCache ( string source_file, string cache_file, int resolution ) : string
source_file string
cache_file string
resolution int
Результат string
        private string RefreshCache(string source_file, string cache_file, int resolution)
        {
            if (File.Exists(cache_file)) {
                // not modified
                if (File.GetLastWriteTime(cache_file) >= File.GetLastWriteTime(source_file)) {
                    return cache_file;
                }
                // modified, clear it
                File.Delete(cache_file);
            }
            return GenerateImage(source_file, cache_file, resolution);
        }