Search Results for

    Show / Hide Table of Contents
    View Source

    Class RepositoryCachePolicyOptions

    Specifies how a repository cache policy should cache entities.

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Core.Cache
    Assembly: Umbraco.Core.dll
    Syntax
    public class RepositoryCachePolicyOptions

    Constructors

    View Source

    RepositoryCachePolicyOptions()

    Ctor - sets GetAllCacheValidateCount = false

    Declaration
    public RepositoryCachePolicyOptions()
    View Source

    RepositoryCachePolicyOptions(Func<Int32>)

    Ctor - sets GetAllCacheValidateCount = true

    Declaration
    public RepositoryCachePolicyOptions(Func<int> performCount)
    Parameters
    Type Name Description
    Func<System.Int32> performCount

    Properties

    View Source

    GetAllCacheAllowZeroCount

    True if the GetAll method will cache that there are zero results so that the db is not hit when there are no results found

    Declaration
    public bool GetAllCacheAllowZeroCount { get; set; }
    Property Value
    Type Description
    System.Boolean
    View Source

    GetAllCacheValidateCount

    True/false as to validate the total item count when all items are returned from cache, the default is true but this means that a db lookup will occur - though that lookup will probably be significantly less expensive than the normal GetAll method.

    Declaration
    public bool GetAllCacheValidateCount { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    setting this to return false will improve performance of GetAll cache with no params but should only be used for specific circumstances

    View Source

    PerformCount

    Callback required to get count for GetAllCacheValidateCount

    Declaration
    public Func<int>? PerformCount { get; set; }
    Property Value
    Type Description
    System.Nullable<Func<System.Int32>>
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • RepositoryCachePolicyOptions()
      • RepositoryCachePolicyOptions(Func<Int32>)
    • Properties
      • GetAllCacheAllowZeroCount
      • GetAllCacheValidateCount
      • PerformCount
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX