C# Class Sage.Views.ViewCache

Implements a simple cache store for saving and restoring transformed views.
Afficher le fichier Open project: igorfrance/sage

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
GetCachePath ( string viewPath, string groupName = null ) : string

Method Details

Get() public méthode

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.
Résultat string

GetLastModified() public méthode

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.
Résultat DateTime?

Has() public méthode

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.
Résultat bool

Save() public méthode

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.
Résultat bool

ViewCache() public méthode

Initializes a new instance of the ViewCache class.
public ViewCache ( SageContext context ) : System
context SageContext The current context.
Résultat System