Search Results for

    Show / Hide Table of Contents
    View Source

    Class CacheEntrySettings

    Represents configuration settings for cache entry durations.

    Inheritance
    object
    Namespace: Umbraco.Cms.Core.Models
    Assembly: Umbraco.Core.dll
    Syntax
    public class CacheEntrySettings
    Remarks

    This class defines the time-to-live (TTL) settings for different cache layers including local (in-memory), remote (distributed), and seed caches.

    Constructors

    View Source

    CacheEntrySettings()

    Declaration
    public CacheEntrySettings()

    Properties

    View Source

    LocalCacheDuration

    Gets or sets the duration that items remain in the local (in-memory) cache.

    Declaration
    public TimeSpan LocalCacheDuration { get; set; }
    Property Value
    Type Description
    TimeSpan

    The local cache duration. Defaults to 1 day.

    View Source

    MaximumLocalCacheItems

    Gets or sets the maximum number of converted items kept in the in-process (L0) published-content cache, or null for no limit.

    Declaration
    public int? MaximumLocalCacheItems { get; set; }
    Property Value
    Type Description
    int?

    The maximum number of entries. Defaults to null (unbounded), preserving the previous behaviour.

    Remarks

    When set, the L0 cache becomes a bounded, scan-resistant (W-TinyLFU) cache: frequently requested content (e.g. the home page) is retained while rarely accessed content is evicted, and a one-off full-tree walk (crawl, sitemap) cannot grow it without bound. Leave unset on small sites; set it on very large sites that see memory pressure from full-tree scans.

    Bounding requires the opt-in Umbraco.Cms.PublishedCache.HybridCache.Bounded package to be installed. If a maximum is configured without it, the cache stays unbounded and a warning is logged at start-up.

    The value is read once when the cache is constructed at start-up, so changing it requires an application restart. Values below 3 are raised to 3 (the minimum the bounded cache supports).

    View Source

    RemoteCacheDuration

    Gets or sets the duration that items remain in the remote (distributed) cache.

    Declaration
    public TimeSpan RemoteCacheDuration { get; set; }
    Property Value
    Type Description
    TimeSpan

    The remote cache duration. Defaults to 365 days.

    View Source

    SeedCacheDuration

    Gets or sets the duration that items remain in the seed cache.

    Declaration
    public TimeSpan SeedCacheDuration { get; set; }
    Property Value
    Type Description
    TimeSpan

    The seed cache duration. Defaults to 365 days.

    Remarks

    The seed cache is used during application startup to pre-populate the cache with frequently accessed content.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX