Esempio n. 1
0
        public List<CacheRow> GetRows(Guid domain)
        {
            var now = DateTime.Now;

            CacheRowCache stored = null;
            //if (!refreshTimes.TryGetValue(domain, out stored) || now - stored.CreatedOn > refreshPeriod)
            {
                var list = GetCacheRows(domain);
                stored = new CacheRowCache { CreatedOn = DateTime.Now, Rows = list };
                refreshTimes[domain] = stored;
            }

            return stored.Rows;
        }
Esempio n. 2
0
        public List <CacheRow> GetRows(Guid domain)
        {
            var now = DateTime.Now;

            CacheRowCache stored = null;

            //if (!refreshTimes.TryGetValue(domain, out stored) || now - stored.CreatedOn > refreshPeriod)
            {
                var list = GetCacheRows(domain);
                stored = new CacheRowCache {
                    CreatedOn = DateTime.Now, Rows = list
                };
                refreshTimes[domain] = stored;
            }

            return(stored.Rows);
        }