Class ContentItemCacheDependencyBuilder
- Namespace
- CMS.ContentEngine
- Assembly
- CMS.ContentEngine.dll
Represents a builder for cache dependencies of content items. CacheDependencyBuilder IContentItemFieldsSource
public sealed class ContentItemCacheDependencyBuilder
- Inheritance
-
objectContentItemCacheDependencyBuilder
- Extension Methods
Methods
All()
Adds a dependency on all content items.
public ContentItemCacheDependencyBuilder All()
Returns
- ContentItemCacheDependencyBuilder
The ContentItemCacheDependencyBuilder instance for method chaining.
Builder()
Returns the root CacheDependencyBuilder.
public CacheDependencyBuilder Builder()
Returns
ByCodeName(string, string)
Adds a dependency on content item with the given code name.
public ContentItemCacheDependencyBuilder ByCodeName(string codeName, string languageName = null)
Parameters
codeName
stringThe code name of the content item.
languageName
stringName of the language. If not specified, all languages are considered.
Returns
- ContentItemCacheDependencyBuilder
The ContentItemCacheDependencyBuilder instance for method chaining.
ByContentType<T>(string)
Adds a dependency on content items with the given content type.
public ContentItemCacheDependencyBuilder ByContentType<T>(string languageName = null) where T : IContentItemFieldsSource
Parameters
languageName
stringName of the language. If not specified, all languages are considered.
Returns
- ContentItemCacheDependencyBuilder
The ContentItemCacheDependencyBuilder instance for method chaining.
Type Parameters
T
Model representing the content type.
ByGuid(Guid, string)
Adds a dependency on content item with the given GUID.
public ContentItemCacheDependencyBuilder ByGuid(Guid guid, string languageName = null)
Parameters
guid
GuidThe GUID of the content item.
languageName
stringName of the language. If not specified, all languages are considered.
Returns
- ContentItemCacheDependencyBuilder
The ContentItemCacheDependencyBuilder instance for method chaining.
ById(int, string)
Adds a dependency on content item with the given ID.
public ContentItemCacheDependencyBuilder ById(int id, string languageName = null)
Parameters
id
intThe ID of the content item.
languageName
stringName of the language. If not specified, all languages are considered.
Returns
- ContentItemCacheDependencyBuilder
The ContentItemCacheDependencyBuilder instance for method chaining.