Class DynamicCacheBustingOptions
- Namespace
- Cuemon.AspNetCore.Configuration
- Assembly
- Cuemon.AspNetCore.dll
Specifies options that is related to DynamicCacheBusting operations.
public class DynamicCacheBustingOptions : CacheBustingOptions, IParameterObject
- Inheritance
-
DynamicCacheBustingOptions
- Implements
- Inherited Members
Examples
The following example demonstrates configuration options for dynamic cache busting.
using System;
using Cuemon.Configuration;
using Microsoft.Extensions.Options;
namespace Cuemon.AspNetCore.Configuration;
public static class DynamicCacheBustingOptionsExample
{
public static void Demonstrate()
{
var options = new DynamicCacheBustingOptions
{
PreferredCasing = CasingMethod.UpperCase,
PreferredLength = 6,
TimeToLive = TimeSpan.FromMinutes(5)
};
var cacheBusting = new DynamicCacheBusting(Options.Create(options));
Console.WriteLine(cacheBusting.Version);
}
}
Constructors
DynamicCacheBustingOptions()
Initializes a new instance of the DynamicCacheBustingOptions class.
public DynamicCacheBustingOptions()
Remarks
The following table shows the initial property values for an instance of DynamicCacheBustingOptions.
| Property | Initial Value |
|---|---|
| PreferredLength | 8 |
| PreferredCharacters | LettersAndNumbers |
| TimeToLive | 12 hours |
Properties
PreferredCharacters
Gets or sets the preferred characters of Version.
public string PreferredCharacters { get; set; }
Property Value
PreferredLength
Gets or sets the preferred length of Version.
public int PreferredLength { get; set; }
Property Value
TimeToLive
Gets or sets the TTL of Version.
public TimeSpan TimeToLive { get; set; }