Sage.LastModifiedCache.Get C# (CSharp) Method

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?
        public DateTime? Get(string resourcePath)
        {
            Contract.Requires<ArgumentNullException>(!string.IsNullOrEmpty(resourcePath));

            string itemKey = string.Format(CacheKeyName, resourcePath);
            object cachedItem = context.Cache.Get(itemKey);
            if (cachedItem != null)
                return (DateTime) cachedItem;

            return null;
        }