Abstract base class for CacheAttribute and CachingConfigurationAttribute, providing common caching configuration properties.
Implements
Namespace: Metalama.Patterns.Caching.Aspects
Assembly: Metalama.Patterns.Caching.Aspects.dll
Syntax
[RunTimeOrCompileTime]
public abstract class CachingBaseAttribute : Attribute, IHierarchicalOptionsProviderRemarks
This class provides compile-time configuration properties that control caching behavior such as expiration times, priority, and cache key generation. Properties set on this attribute take precedence over run-time configuration specified through CachingProfile.
Constructors
| Name | Description |
|---|---|
| CachingBaseAttribute() |
Properties
| Name | Description |
|---|---|
| AbsoluteExpiration | Gets or sets the total duration, in minutes, during which the result of the cached method is stored in cache. The absolute expiration time is counted from the moment the method is evaluated and cached. |
| AutoReload | Gets or sets a value indicating whether the method calls are automatically reloaded (by re-evaluating the target method with the same arguments) when the cache item is removed from the cache. |
| IgnoreThisParameter | Gets or sets a value indicating whether the |
| Priority | Gets or sets the priority of the cached method. |
| ProfileName | Gets or sets the name of the CachingProfile that contains the configuration of the cached methods. |
| SlidingExpiration | Gets or sets the duration, in minutes, during which the result of the cached method is stored in cache after it has been added to or accessed from the cache. The expiration is extended every time the value is accessed from the cache. |
| UseDependencyInjection | Gets or sets a value indicating whether the ICachingService should be obtained through dependency injection.
The default value is |
Methods
| Name | Description |
|---|---|
| GetOptions(in OptionsProviderContext) |