C# Класс Aspectacular.RequestCache

Caches data for the duration of the HTTP request processing. Should be used together with [InvariantReturn] attribute applied to methods and classes whose results can be cached.
No explicit cleanup/invalidation is required as cached data is dropped at the end of the request processing. This caching mechanism could be used to eliminate same queries to the database done within the scope of a single page. Please note that method unique signature involves a very slow method parameter evaluation. and therefore only methods with high likelihood of repeated calls should be cached.
Наследование: ICacheProvider
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
requestCacher RequestCache

Открытые методы

Метод Описание
Get ( ) : RequestCache

Factory returning instance of the http request-level cache provider for caching aspect.

Set ( string key, object val ) : void
TryGet ( string key, object &val ) : bool

Защищенные методы

Метод Описание
RequestCache ( ) : System.Web

Please use static Get() factory method instead of the constructor.

Описание методов

Get() публичный статический Метод

Factory returning instance of the http request-level cache provider for caching aspect.
public static Get ( ) : RequestCache
Результат RequestCache

RequestCache() защищенный Метод

Please use static Get() factory method instead of the constructor.
protected RequestCache ( ) : System.Web
Результат System.Web

Set() публичный Метод

public Set ( string key, object val ) : void
key string
val object
Результат void

TryGet() публичный Метод

public TryGet ( string key, object &val ) : bool
key string
val object
Результат bool

Описание свойств

requestCacher защищенное статическое свойство

No reason to instantiate destroy it - it has no state and works on the current request.
protected static RequestCache,Aspectacular requestCacher
Результат RequestCache