public Startup(IConfiguration configuration)
 {
     Configuration = configuration;
     IocConfig.Register(configuration);
     sidExpire    = CacheKeyUtils.GetExpire("SessionDb", "UserSession");
     minRefExpire = sidExpire.HasValue ? (sidExpire.Value.TotalMinutes - 5.0) : 0.0;
     if (minRefExpire < 5.0)
     {
         minRefExpire = sidExpire.Value.TotalMinutes - 1.0;
     }
 }
        protected virtual List <int> GetCacheDb()
        {
            if (dbList == null)
            {
                dbList = CacheKeyUtils.GetDb(this.Node, this.Item);
                if (dbList.Count == 0)
                {
                    dbList.Add(0);
                }
            }

            return(dbList);
        }
        protected virtual string GetCacheKey(params object[] args)
        {
            string key = CacheKeyUtils.GetKey(this.Node, this.Item);

            if (args != null && args.Length > 0)
            {
                for (int i = 0; i < args.Length; i++)
                {
                    if (args[i] == null)
                    {
                        args[i] = "null";
                    }
                }
                key = string.Format(key, args);
            }

            return(key);
        }
 public virtual TimeSpan?GetConfigExpire()
 {
     return(CacheKeyUtils.GetExpire(this.Node, this.Item));
 }