C# Class Sage.LastModifiedCache

Provides a simple mechanism for saving to and restoring from the ASP.NET cache the last modification dates of local resources.
Afficher le fichier Open project: igorfrance/sage

Méthodes publiques

Méthode Description
Get ( string resourcePath ) : DateTime?

Gets the cached last modification date for the specified resource if present, otherwise null.

Put ( string resourcePath, System.DateTime lastModificationDate, List dependencies ) : void

Saves the last modification of the specified resourcePath.

Private Methods

Méthode Description
LastModifiedCache ( SageContext context ) : System

Initializes a new instance of the LastModifiedCache class, using the specified context.

OnCacheItemExpired ( string key, CacheItemUpdateReason reason, object &expensiveObject, System.Web.Caching.CacheDependency &dependency, System.DateTime &absoluteExpiration, System.TimeSpan &slidingExpiration ) : void

Method Details

Get() public méthode

Gets the cached last modification date for the specified resource if present, otherwise null.
public Get ( string resourcePath ) : DateTime?
resourcePath string The resource path for which to get the last modification date.
Résultat DateTime?

Put() public méthode

Saves the last modification of the specified resourcePath.
public Put ( string resourcePath, System.DateTime lastModificationDate, List dependencies ) : void
resourcePath string The resource path for which to store the date.
lastModificationDate System.DateTime The last modification date to store.
dependencies List The dependencies of the . If any one of /// these files changes, the cached item will expire and be removed from cache, thereby ensuring that /// the cached date is correct; its absence would indicate that the last modification date has expired /// (or has never been saved, in any case causing the caller to get a fresh last modification date)
Résultat void