2020-12-06 10:46:04 +01:00
|
|
|
// Copyright (c) Umbraco.
|
|
|
|
|
// See LICENSE for more details.
|
|
|
|
|
|
|
|
|
|
using System;
|
2020-09-23 14:00:08 +02:00
|
|
|
using System.IO;
|
2020-09-14 21:27:31 +02:00
|
|
|
|
2021-02-18 11:06:02 +01:00
|
|
|
namespace Umbraco.Cms.Core.Configuration.Models
|
2020-08-20 08:24:23 +01:00
|
|
|
{
|
2020-12-06 10:46:04 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Typed configuration options for image cache settings.
|
|
|
|
|
/// </summary>
|
2020-08-20 08:24:23 +01:00
|
|
|
public class ImagingCacheSettings
|
|
|
|
|
{
|
2020-12-06 10:46:04 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets or sets a value for the browser image cache maximum age.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public TimeSpan BrowserMaxAge { get; set; } = TimeSpan.FromDays(7);
|
2020-08-20 08:24:23 +01:00
|
|
|
|
2020-12-06 10:46:04 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets or sets a value for the image cache maximum age.
|
|
|
|
|
/// </summary>
|
2020-09-23 14:00:08 +02:00
|
|
|
public TimeSpan CacheMaxAge { get; set; } = TimeSpan.FromDays(365);
|
2020-08-20 08:24:23 +01:00
|
|
|
|
2020-12-06 10:46:04 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets or sets a value for length of the cached name.
|
|
|
|
|
/// </summary>
|
2020-09-01 18:10:12 +02:00
|
|
|
public uint CachedNameLength { get; set; } = 8;
|
2020-08-20 08:24:23 +01:00
|
|
|
|
2020-12-06 10:46:04 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets or sets a value for the cache folder.
|
|
|
|
|
/// </summary>
|
2020-10-21 21:04:10 +02:00
|
|
|
public string CacheFolder { get; set; } = Path.Combine("..", "umbraco", "mediacache");
|
2020-08-20 08:24:23 +01:00
|
|
|
}
|
|
|
|
|
}
|