logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class PrefetchBudget

    Value object representing budget constraints for prefetch operations.
    Defines maximum limits for cache items and memory usage.

    Inheritance
    object
    PrefetchBudget
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    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

    Overrides
    object.ToString()
    In this article
    © 2026 Serenity. All Rights Reserved