Interface IRequestCache
Defines a request-level cache that stores items for the duration of a single HTTP request.
Namespace: Umbraco.Cms.Core.Cache
Assembly: Umbraco.Core.dll
Syntax
public interface IRequestCache : IAppCache
Remarks
The request cache is designed to store transient data that is only valid within the context of a single HTTP request. Outside a web environment, the behavior of this cache is unspecified.
Properties
View SourceIsAvailable
Gets a value indicating whether the request cache is available.
Declaration
bool IsAvailable { get; }
Property Value
| Type | Description |
|---|---|
| bool |
|
Methods
View SourceRemove(string)
Removes a value from the request cache.
Declaration
bool Remove(string key)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The key of the item to remove. |
Returns
| Type | Description |
|---|---|
| bool |
|
Set(string, object?)
Sets a value in the request cache.
Declaration
bool Set(string key, object? value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The key of the item to set. |
| object | value | The value to store in the cache. |
Returns
| Type | Description |
|---|---|
| bool |
|