// Copyright (c) Umbraco. // See LICENSE for more details. using System; using System.ComponentModel; using System.IO; namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration options for image cache settings. /// public class ImagingCacheSettings { internal const string StaticBrowserMaxAge = "7.00:00:00"; internal const string StaticCacheMaxAge = "365.00:00:00"; internal const int StaticCacheHashLength = 12; internal const int StaticCacheFolderDepth = 8; internal const string StaticCacheFolder = Constants.SystemDirectories.TempData + "/MediaCache"; /// /// Gets or sets a value for the browser image cache maximum age. /// [DefaultValue(StaticBrowserMaxAge)] public TimeSpan BrowserMaxAge { get; set; } = TimeSpan.Parse(StaticBrowserMaxAge); /// /// Gets or sets a value for the image cache maximum age. /// [DefaultValue(StaticCacheMaxAge)] public TimeSpan CacheMaxAge { get; set; } = TimeSpan.Parse(StaticCacheMaxAge); /// /// Gets or sets a value for the image cache hash length. /// [DefaultValue(StaticCacheHashLength)] public uint CacheHashLength { get; set; } = StaticCacheHashLength; /// /// Gets or sets a value for the image cache folder depth. /// [DefaultValue(StaticCacheFolderDepth)] public uint CacheFolderDepth { get; set; } = StaticCacheFolderDepth; /// /// Gets or sets a value for the image cache folder. /// [DefaultValue(StaticCacheFolder)] public string CacheFolder { get; set; } = StaticCacheFolder; } }