Пример #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);
        }