public static void Refresh()
        {
            Preferences = AppSettings.HelperTableOptions;
            IEnumerable <Site> sites;

            _cache.Clear();

            if (Preferences == null)
            {
                return;
            }

            if (!Preferences.PerSite)
            {
                sites = Current.DB.Query <Site>("SELECT TOP 1 * FROM Sites");
            }
            else
            {
                sites = Current.DB.Sites.All();
            }

            foreach (var site in sites)
            {
                IEnumerable <TableInfo> tables = site.GetTableInfos();
                var tablesCache = new Dictionary <string, ResultSet>();

                foreach (var table in tables)
                {
                    if (_tableMatcher.IsMatch(table.Name))
                    {
                        using (SqlConnection connection = site.GetOpenConnection()) {
                            tablesCache[table.Name] = GetTableResults(connection, table);
                        }
                    }
                }

                _cache[site.TinyName] = tablesCache;
            }
        }
        public static void Refresh()
        {
            Preferences = AppSettings.HelperTableOptions;
            IEnumerable<Site> sites;

            cache.Clear();

            if (Preferences == null)
            {
                return;
            }

            if (!Preferences.PerSite)
            {
                sites = Current.DB.Query<Site>("SELECT TOP 1 * FROM Sites");
            }
            else
            {
                sites = Current.DB.Sites.All();
            }

            foreach (var site in sites)
            {
                IEnumerable<TableInfo> tables = site.GetTableInfos();
                var tablesCache = new Dictionary<string, ResultSet>();

                foreach (var table in tables) {
                    if (tableMatcher.IsMatch(table.Name))
                    {
                        using (var connection = site.GetOpenConnection()) {
                            tablesCache[table.Name] = GetTableResults(connection, table);
                        }
                    }
                }

                cache[site.TinyName] = tablesCache;
            }
        }