Class CacheOptionsValidator
Validates CacheOptions at startup via the ValidateOnStart pipeline.
public sealed class CacheOptionsValidator : IValidateOptions<CacheOptions>
- Inheritance
-
CacheOptionsValidator
- Implements
- Inherited Members
- Extension Methods
Remarks
Performs cross-property constraint checks including:
- DefaultExpiration must be positive
- CacheTimeout must be positive and less than DefaultExpiration
- JitterRatio must be between 0.0 and 1.0
- TagStampLifetime must be positive and greater than DefaultExpiration
- TagStampRefreshInterval must be positive
Methods
Validate(string?, CacheOptions)
Validates a specified named options instance (or all if name is null).
public ValidateOptionsResult Validate(string? name, CacheOptions options)
Parameters
namestringThe name of the options instance being validated.
optionsCacheOptionsThe options instance.
Returns
- ValidateOptionsResult
The ValidateOptionsResult result.