Skip to content

Conversation

Azaferany
Copy link

add a constructor dependency on IOptions options

base on #128

this.cacheProvider = new Lazy<ICacheProvider>(() => cacheProvider);
keyLocks = new int[_options.NumberOfKeyLocks];
DefaultCachePolicy.DefaultCacheDurationSeconds = _options.DefaultCacheDurationSeconds;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor Suggestion: Consider removing this redundant empty line for cleaner code presentation.

{
public int DefaultCacheDurationSeconds { get; set; } = 60 * 20;
public int NumberOfKeyLocks { get; set; } = Math.Max(Environment.ProcessorCount * 8, 32);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor Suggestion: Consider removing this redundant empty line for cleaner code presentation.

public int NumberOfKeyLocks { get; set; } = Math.Max(Environment.ProcessorCount * 8, 32);

}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Including an empty line at the end of a file ensures consistency in version control diffs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants