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.
ファイルを表示 Open project: igorfrance/sage

Public Methods

Method 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

Method 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 method

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.
return DateTime?

Put() public method

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)
return void