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)); } }
private void RefreshCache() { allPrefix = ScanDataBaseManager.GetPrefix().Select(x => x.Prefix).ToList(); allPrefix = allPrefix.OrderByDescending(x => x.Length).ToList(); }