Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc updates to HybridCacheOptions #5493

Merged
merged 2 commits into from
Oct 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ public class HybridCacheOptions
private const int ShiftBytesToMibiBytes = 20;

/// <summary>
/// Gets or sets the default global options to be applied to <see cref="HybridCache"/> operations; if options are
/// specified at the individual call level, the non-null values are merged (with the per-call
/// options being used in preference to the global options). If no value is specified for a given
/// option (globally or per-call), the implementation may choose a reasonable default.
/// Gets or sets the default global options to be applied to <see cref="HybridCache"/> operations.
/// </summary>
/// <remarks>
/// If options are specified at the individual call level, the non-null values are merged
/// (with the per-call options being used in preference to the global options). If no value is
/// specified for a given option (globally or per-call), the implementation can choose a reasonable default.
/// </remarks>
public HybridCacheEntryOptions? DefaultEntryOptions { get; set; }

/// <summary>
Expand All @@ -24,21 +26,35 @@ public class HybridCacheOptions
public bool DisableCompression { get; set; }

/// <summary>
/// Gets or sets the maximum size of cache items; attempts to store values over this size will be logged
/// and the value will not be stored in cache.
/// Gets or sets the maximum size of cache items.
/// </summary>
/// <remarks>The default value is 1 MiB.</remarks>
/// <value>
/// The maximum size of cache items. The default value is 1 MiB.
/// </value>
/// <remarks>
/// Attempts to store values over this size are logged,
/// and the value isn't stored in the cache.
/// </remarks>
public long MaximumPayloadBytes { get; set; } = 1 << ShiftBytesToMibiBytes; // 1MiB

/// <summary>
/// Gets or sets the maximum permitted length (in characters) of keys; attempts to use keys over this size will be logged.
/// Gets or sets the maximum permitted length (in characters) of keys.
/// </summary>
/// <remark>The default value is 1024 characters.</remark>
/// <value>
/// The maximum permitted length of keys, in characters. The default value is 1024 characters.
/// </value>
/// <remarks>Attempts to use keys over this size are logged.</remarks>
public int MaximumKeyLength { get; set; } = 1024; // characters

/// <summary>
/// Gets or sets a value indicating whether to use "tags" data as dimensions on metric reporting; if enabled, care should be used to ensure that
/// tags do not contain data that should not be visible in metrics systems.
/// Gets or sets a value indicating whether to use "tags" data as dimensions on metric reporting.
/// </summary>
/// <value>
/// <see langword="true"/> to use "tags" data as dimensions on metric reporting; otherwise, <see langword="false"/>.
/// </value>
/// <remarks>
/// If enabled, take care to ensure that tags don't contain data that
/// should not be visible in metrics systems.
/// </remarks>
public bool ReportTagMetrics { get; set; }
}
Loading