// 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"; // TimeSpan.FromDays(7);
internal const string StaticCacheMaxAge = "365.00:00:00"; // TimeSpan.FromDays(365);
internal const int StaticCachedNameLength = 8;
internal const string StaticCacheFolder = "../umbraco/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 length of the cached name.
///
[DefaultValue(StaticCachedNameLength)]
public uint CachedNameLength { get; set; } = StaticCachedNameLength;
///
/// Gets or sets a value for the cache folder.
///
[DefaultValue(StaticCacheFolder)]
public string CacheFolder { get; set; } = StaticCacheFolder;
}
}