Show / Hide Table of Contents

Class CacheOptions

Inheritance
System.Object
CacheOptions
CacheOptions<T>
EvalCacheOptions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: AzureFromTheTrenches.Commanding.Cache
Assembly: AzureFromTheTrenches.Commanding.Cache.dll
Syntax
public class CacheOptions

Constructors

| Improve this Doc View Source

CacheOptions(Func<DateTime>, Nullable<Int32>)

Declaration
protected CacheOptions(Func<DateTime> expiresAtUtcFunc, int? maxConcurrentExecutions = default(int? ))
Parameters
Type Name Description
System.Func<System.DateTime> expiresAtUtcFunc
System.Nullable<System.Int32> maxConcurrentExecutions
| Improve this Doc View Source

CacheOptions(Func<TimeSpan>, Nullable<Int32>)

Declaration
protected CacheOptions(Func<TimeSpan> lifeTimeFunc, int? maxConcurrentExecutions = default(int? ))
Parameters
Type Name Description
System.Func<System.TimeSpan> lifeTimeFunc
System.Nullable<System.Int32> maxConcurrentExecutions
| Improve this Doc View Source

CacheOptions(Type, DateTime, Nullable<Int32>)

Declaration
public CacheOptions(Type commandType, DateTime expiresAtUtc, int? maxConcurrentExecutions = default(int? ))
Parameters
Type Name Description
System.Type commandType
System.DateTime expiresAtUtc
System.Nullable<System.Int32> maxConcurrentExecutions
| Improve this Doc View Source

CacheOptions(Type, Func<DateTime>, Nullable<Int32>)

Declaration
public CacheOptions(Type commandType, Func<DateTime> expiresAtUtcFunc, int? maxConcurrentExecutions = default(int? ))
Parameters
Type Name Description
System.Type commandType
System.Func<System.DateTime> expiresAtUtcFunc
System.Nullable<System.Int32> maxConcurrentExecutions
| Improve this Doc View Source

CacheOptions(Type, Func<TimeSpan>, Nullable<Int32>)

Declaration
public CacheOptions(Type commandType, Func<TimeSpan> lifeTimeFunc, int? maxConcurrentExecutions = default(int? ))
Parameters
Type Name Description
System.Type commandType
System.Func<System.TimeSpan> lifeTimeFunc
System.Nullable<System.Int32> maxConcurrentExecutions
| Improve this Doc View Source

CacheOptions(Type, TimeSpan, Nullable<Int32>)

Declaration
public CacheOptions(Type commandType, TimeSpan lifeTime, int? maxConcurrentExecutions = default(int? ))
Parameters
Type Name Description
System.Type commandType
System.TimeSpan lifeTime
System.Nullable<System.Int32> maxConcurrentExecutions

Properties

| Improve this Doc View Source

CommandType

Declaration
public Type CommandType { get; }
Property Value
Type Description
System.Type
| Improve this Doc View Source

ExpiresAtUtc

Declaration
public Func<DateTime> ExpiresAtUtc { get; }
Property Value
Type Description
System.Func<System.DateTime>
| Improve this Doc View Source

LifeTime

Declaration
public Func<TimeSpan> LifeTime { get; }
Property Value
Type Description
System.Func<System.TimeSpan>
| Improve this Doc View Source

MaxConcurrentExecutions

If set this throttles the number of concurrent executions that can occur of the underlying command handler when the cache misses. This can be useful when the underlying request is expensive and hitting it with multiple requests simultaneously could cause failures. This is mostly intended for scenarios with high levels of requests / transactions. Note that the implementation for this uses a double lock approach with a semaphore and so anything that finds itself blocked due to the throttle should find the result in the cache. Should further be noted that this lock is obviously within the process and not shared across servers.

Declaration
public int? MaxConcurrentExecutions { get; }
Property Value
Type Description
System.Nullable<System.Int32>
  • Improve this Doc
  • View Source
Back to top Generated by DocFX