C# Класс Sage.Views.ViewCache

Implements a simple cache store for saving and restoring transformed views.
Показать файл Открыть проект

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

Метод Описание
Get ( string viewPath, string groupName = null ) : string

Gets the specified view path.

GetLastModified ( string path, string groupName = null ) : DateTime?

Gets the last modified date of the specified path.

Has ( string viewPath, string groupName = null ) : bool

Determines whether the specified view path has been cached, and is still valid.

Save ( string viewPath, string content, string groupName = null ) : bool

Saves the specified content to the cache.

ViewCache ( SageContext context ) : System

Initializes a new instance of the ViewCache class.

Приватные методы

Метод Описание
GetCachePath ( string viewPath, string groupName = null ) : string

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

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

Gets the specified view path.
public Get ( string viewPath, string groupName = null ) : string
viewPath string The view path.
groupName string Optional name of the cache group that the belongs to.
Результат string

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

Gets the last modified date of the specified path.
public GetLastModified ( string path, string groupName = null ) : DateTime?
path string The source path of the cached item.
groupName string Optional name of the cache group that the belongs to.
Результат DateTime?

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

Determines whether the specified view path has been cached, and is still valid.
public Has ( string viewPath, string groupName = null ) : bool
viewPath string The view path to check.
groupName string Optional name of the cache group that the belongs to.
Результат bool

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

Saves the specified content to the cache.
public Save ( string viewPath, string content, string groupName = null ) : bool
viewPath string The view path.
content string The content.
groupName string Optional name of the cache group that the belongs to.
Результат bool

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

Initializes a new instance of the ViewCache class.
public ViewCache ( SageContext context ) : System
context SageContext The current context.
Результат System