Esempio n. 1
0
        private static void UpdateCache()
        {
            if (!CacheTools.HasCache("cache-prefix"))
            {
                var allPrefix = ScanDataBaseManager.GetPrefix().Select(x => x.Prefix).ToList();
                allPrefix = allPrefix.OrderByDescending(x => x.Length).ToList();

                CacheTools.CacheInsert("cache-prefix", allPrefix, DateTime.Now.AddDays(1));
            }
        }
Esempio n. 2
0
 private void RefreshCache()
 {
     allPrefix = ScanDataBaseManager.GetPrefix().Select(x => x.Prefix).ToList();
     allPrefix = allPrefix.OrderByDescending(x => x.Length).ToList();
 }