Class AppCaches
Represents the application caches.
Inheritance
Namespace: Umbraco.Cms.Core.Cache
Assembly: Umbraco.Core.dll
Syntax
public class AppCaches : IDisposable
Constructors
View SourceAppCaches(IAppPolicyCache, IRequestCache, IsolatedCaches)
Initializes a new instance of the AppCaches with cache providers.
Declaration
public AppCaches(IAppPolicyCache runtimeCache, IRequestCache requestCache, IsolatedCaches isolatedCaches)
Parameters
Type | Name | Description |
---|---|---|
IAppPolicyCache | runtimeCache | |
IRequestCache | requestCache | |
IsolatedCaches | isolatedCaches |
Properties
View SourceDisabled
Gets the special disabled instance.
Declaration
public static AppCaches Disabled { get; }
Property Value
Type | Description |
---|---|
AppCaches |
Remarks
When used by repositories, all cache policies apply, but the underlying caches do not cache anything.
Used by tests.
IsolatedCaches
Gets the isolated caches.
Declaration
public IsolatedCaches IsolatedCaches { get; }
Property Value
Type | Description |
---|---|
IsolatedCaches |
Remarks
Isolated caches are used by e.g. repositories, to ensure that each cached entity type has its own cache, so that lookups are fast and the repository does not need to search through all keys on a global scale.
NoCache
Gets the special no-cache instance.
Declaration
public static AppCaches NoCache { get; }
Property Value
Type | Description |
---|---|
AppCaches |
Remarks
When used by repositories, all cache policies are bypassed.
Used by repositories that do no cache.
RequestCache
Gets the per-request cache.
Declaration
public IRequestCache RequestCache { get; }
Property Value
Type | Description |
---|---|
IRequestCache |
Remarks
The per-request caches works on top of the current HttpContext items.
Outside a web environment, the behavior of that cache is unspecified.
RuntimeCache
Gets the runtime cache.
Declaration
public IAppPolicyCache RuntimeCache { get; }
Property Value
Type | Description |
---|---|
IAppPolicyCache |
Remarks
The runtime cache is the main application cache.
Methods
View SourceCreate(IRequestCache)
Declaration
public static AppCaches Create(IRequestCache requestCache)
Parameters
Type | Name | Description |
---|---|---|
IRequestCache | requestCache |
Returns
Type | Description |
---|---|
AppCaches |
Dispose()
Declaration
public void Dispose()
Dispose(Boolean)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |