Class PrefetchBudget
Value object representing budget constraints for prefetch operations.
Defines maximum limits for cache items and memory usage.
Inherited Members
Namespace: Serenity.AssetPrefetcher.Domain.ValueObjects
Assembly: Serenity.AssetPrefetcher.Domain.dll
Syntax
public class PrefetchBudget
Constructors
PrefetchBudget(int, int)
Initializes a new prefetch budget with the specified constraints.
Declaration
public PrefetchBudget(int maxItems, int maxSizeMB)
Parameters
| Type | Name | Description |
|---|---|---|
| int | maxItems | Maximum number of cached items allowed |
| int | maxSizeMB | Maximum memory size in megabytes allowed |
Properties
MaxItems
Declaration
public int MaxItems { get; }
Property Value
| Type | Description |
|---|---|
| int | Maximum number of items that can be cached simultaneously. |
MaxSizeMB
Declaration
public int MaxSizeMB { get; }
Property Value
| Type | Description |
|---|---|
| int | Maximum memory size in megabytes that can be used for caching. |
Methods
ToString()
Returns a string representation of the budget constraints.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | Formatted string with budget information |