コード例 #1
0
 /// <summary>
 /// Returns the configured xsd:duration lifespan for the given cache key
 /// </summary>
 /// <param name="key"></param>
 /// <returns></returns>
 public string GetLifespanDuration(string key)
 {
     CacheElement element = base.BaseGet(key) as CacheElement;
     if (element == null)
     {
         element = new CacheElement();
     }
     return element.Lifespan;
 }
コード例 #2
0
 /// <summary>
 /// Returns the configured lifespan for the given cache key
 /// </summary>
 /// <param name="key"></param>
 /// <returns></returns>
 public TimeSpan GetLifespan(string key)
 {
     CacheElement element = base.BaseGet(key) as CacheElement;
     if (element == null)
     {
         element = new CacheElement();
     }
     return element.GetLifespan();
 }
コード例 #3
0
        /// <summary>
        /// Returns the configured lifespan for the given cache key
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        public TimeSpan GetLifespan(string key)
        {
            CacheElement element = base.BaseGet(key) as CacheElement;

            if (element == null)
            {
                element = new CacheElement();
            }
            return(element.GetLifespan());
        }
コード例 #4
0
        /// <summary>
        /// Returns the configured xsd:duration lifespan for the given cache key
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        public string GetLifespanDuration(string key)
        {
            CacheElement element = base.BaseGet(key) as CacheElement;

            if (element == null)
            {
                element = new CacheElement();
            }
            return(element.Lifespan);
        }