Search Results for

    Show / Hide Table of Contents

    Class CacheConfig

    Cache Configuration Options

    Inheritance
    System.Object
    CacheConfig
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: System.Linq.Dynamic.Core.Util.Cache
    Assembly: System.Linq.Dynamic.Core.dll
    Syntax
    public class CacheConfig

    Properties

    | Improve this Doc View Source

    CleanupFrequency

    Sets the frequency for running the cleanup process in the Constant Expression cache. By default, cleanup occurs every 10 minutes.

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

    MinItemsTrigger

    Configures the minimum number of items required in the constant expression cache before triggering cleanup. This prevents frequent cleanups, especially in caches with few items. A default value of null implies that cleanup is always allowed to run, helping in timely removal of unused cache items.

    Declaration
    public int? MinItemsTrigger { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Int32>
    | Improve this Doc View Source

    ReturnExpiredItems

    Enables returning expired cache items in scenarios where cleanup, running on a separate thread, has not yet removed them. This allows for the retrieval of an expired object without needing to clear and recreate it if a request is made concurrently with cleanup. Particularly useful when cached items are deterministic, ensuring consistent results even from expired entries. Default true;

    Declaration
    public bool ReturnExpiredItems { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    TimeToLive

    Sets a Time-To-Live (TTL) for items in the constant expression cache to prevent uncontrolled growth. Items not accessed within this TTL will be expired, allowing garbage collection to reclaim the memory. Default is 10 minutes.

    Declaration
    public TimeSpan TimeToLive { get; set; }
    Property Value
    Type Description
    System.TimeSpan
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX