Sage.LastModifiedCache.Get C# (CSharp) 메소드

Get() 공개 메소드

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.
리턴 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;
        }