View Source
Class HttpContextRequestAppCache
Implements a IAppCache on top of Microsoft.AspNetCore.Http.IHttpContextAccessor
Assembly: Umbraco.Web.Common.dll
Syntax
public class HttpContextRequestAppCache : FastDictionaryAppCacheBase, IRequestCache, IAppCache
Constructors
View Source
HttpContextRequestAppCache(IHttpContextAccessor)
Declaration
public HttpContextRequestAppCache(IHttpContextAccessor httpContextAccessor)
Parameters
| Type |
Name |
Description |
| IHttpContextAccessor |
httpContextAccessor |
|
Properties
View Source
IsAvailable
Returns true if the request cache is available otherwise false
Declaration
public bool IsAvailable { get; }
Property Value
Methods
View Source
EnterReadLock()
Declaration
protected override void EnterReadLock()
View Source
EnterWriteLock()
Declaration
protected override void EnterWriteLock()
View Source
ExitReadLock()
Declaration
protected override void ExitReadLock()
View Source
ExitWriteLock()
Declaration
protected override void ExitWriteLock()
View Source
Get(string, Func<object?>)
Gets or creates an item identified by its key.
Declaration
public override object? Get(string key, Func<object?> factory)
Parameters
| Type |
Name |
Description |
| string |
key |
The key of the item.
|
| Func<object> |
factory |
A factory function that can create the item.
|
Returns
| Type |
Description |
| object |
The item.
|
View Source
GetDictionaryEntries()
Declaration
protected override IEnumerable<KeyValuePair<object, object>> GetDictionaryEntries()
Returns
| Type |
Description |
| IEnumerable<KeyValuePair<object, object>> |
|
View Source
GetEntry(string)
Declaration
protected override object? GetEntry(string key)
Parameters
| Type |
Name |
Description |
| string |
key |
|
Returns
View Source
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<KeyValuePair<string, object?>> GetEnumerator()
Returns
| Type |
Description |
| IEnumerator<KeyValuePair<string, object>> |
An enumerator that can be used to iterate through the collection.
|
View Source
Remove(string)
Declaration
public bool Remove(string key)
Parameters
| Type |
Name |
Description |
| string |
key |
|
Returns
View Source
RemoveEntry(string)
Declaration
protected override void RemoveEntry(string key)
Parameters
| Type |
Name |
Description |
| string |
key |
|
View Source
Set(string, object?)
Declaration
public bool Set(string key, object? value)
Parameters
| Type |
Name |
Description |
| string |
key |
|
| object |
value |
|
Returns