November Happy Hour will be moved to Thursday December 5th.

Class ContentOptions

Contains various options that can be used to configure how content should be handled within CMS

Inheritance
System.Object
ContentOptions
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: EPiServer.Core
Assembly: EPiServer.dll
Version: 11.20.7
Syntax
[Options]
public class ContentOptions

Constructors

ContentOptions()

Declaration
public ContentOptions()

Fields

NoStringCompression

Value to use for StringCompressionThreshold when no string compression should be used.

Declaration
public const int NoStringCompression = 0
Field Value
Type Description
System.Int32

Properties

ContentCacheSlidingExpiration

The sliding cache for how long published content is cached. Set to "0:0:0" to disable.

Declaration
public TimeSpan ContentCacheSlidingExpiration { get; set; }
Property Value
Type Description
System.TimeSpan
Remarks

Default value is 12 hours

EnableDynamicProperties

Gets or sets if DynamicProperties should be enabled.

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

DynamicProperties are disabled by default.

InMemoryCopyThreshold

Gets or sets the maximum number of content items that will be copied in one operation using in process memory.

Declaration
public int InMemoryCopyThreshold { get; set; }
Property Value
Type Description
System.Int32
Remarks

Default value is 50 content items

InvalidateRemoteCacheForVersions

Defines if changes to content versions should trigger cache invalidation on remote servers.

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

The default value is true

MaximumContentItemsPerDatabaseRequest

The maximum number of content items that should be returned from a content query in one database request.

Declaration
public int MaximumContentItemsPerDatabaseRequest { get; set; }
Property Value
Type Description
System.Int32
Remarks

Default value is 2000 content items

MaximumVersions

The maximum number of previously published versions that will be kept.

Declaration
public int MaximumVersions { get; set; }
Property Value
Type Description
System.Int32
Remarks

Default value is 20

PropertyLazyLoadThreshold

The number of characters when lazy loading should be activated for properties using the LongString data type.

Declaration
public int PropertyLazyLoadThreshold { get; set; }
Property Value
Type Description
System.Int32
Remarks

Default value is 255 characters

Providers

List of content providers that should be used by the system; each represented by a ContentProviderBuilder instance.

Declaration
public IDictionary<string, ContentProviderBuilder> Providers { get; }
Property Value
Type Description
System.Collections.Generic.IDictionary<System.String, ContentProviderBuilder>

ProxyType

Gets or sets the proxy type to be used in content generation.

Declaration
public ProxyType ProxyType { get; set; }
Property Value
Type Description
ProxyType
Remarks

Default value is Auto

StringCompressionThreshold

Set to the number of characters when compression should be activated .

Declaration
public int StringCompressionThreshold { get; set; }
Property Value
Type Description
System.Int32
Remarks

Default value is 0 meaning no compression is done

VersionCacheSlidingExpiration

The sliding cache for how long a content version is cached. Set to "0:0:0" to disable.

Declaration
public TimeSpan VersionCacheSlidingExpiration { get; set; }
Property Value
Type Description
System.TimeSpan
Remarks

Default value is 10 minutes

Methods

AddProvider<TProvider>(String, Action<NameValueCollection>)

Adds a ContentProvider of the given type.

Declaration
public ContentOptions AddProvider<TProvider>(string name, Action<NameValueCollection> configure)
    where TProvider : ContentProvider
Parameters
Type Name Description
System.String name

The name of the provider to add.

System.Action<System.Collections.Specialized.NameValueCollection> configure

Method to configure the parameter collection.

Returns
Type Description
ContentOptions
Type Parameters
Name Description
TProvider

The type of provider to add.

Extension Methods