Class AppCaches
Represents the application caches.
Inheritance
Namespace: Umbraco.Core.Cache
Assembly: Umbraco.Core.dll
Syntax
public class AppCaches : IDisposable
Constructors
View SourceAppCaches()
Initializes a new instance of the AppCaches for use in a web application.
Declaration
public AppCaches()
AppCaches(Cache)
Initializes a new instance of the AppCaches for use in a web application.
Declaration
public AppCaches(Cache cache)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Caching.Cache | cache |
AppCaches(IAppPolicyCache, IAppCache, IsolatedCaches)
Initializes a new instance of the AppCaches with cache providers.
Declaration
public AppCaches(IAppPolicyCache runtimeCache, IAppCache requestCache, IsolatedCaches isolatedCaches)
Parameters
Type | Name | Description |
---|---|---|
IAppPolicyCache | runtimeCache | |
IAppCache | 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 IAppCache RequestCache { get; }
Property Value
Type | Description |
---|---|
IAppCache |
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 SourceDispose()
Declaration
public void Dispose()
Dispose(Boolean)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |