Esempio n. 1
0
        public void ScheduleRefresh(CacheEntry entry)
        {
            bool startTimer = false;
             lock (_entriesToRefresh)
             {

            bool isAutoRefresh = entry.CachePolicy == CachePolicy.AutoRefresh;

            int index = _entriesToRefresh.IndexOf(entry);

            if (index == -1 && isAutoRefresh)
            {
               _entriesToRefresh.Add(entry);
            }
            else if (index != -1 && !isAutoRefresh)
            {
               _entriesToRefresh.RemoveAt(index);
            }

            _entriesToRefresh.OrderBy(e => e.ExpirationTime);

            startTimer = _entriesToRefresh.Count > 0;
             }

             if (startTimer)
             {
            EnsureTimer();
             }
        }
Esempio n. 2
0
 public CacheValueLoader(CacheEntry owningEntry)
     : base(owningEntry)
 {
 }
Esempio n. 3
0
 public LiveValueLoader(CacheEntry entry)
     : base(entry)
 {
 }
Esempio n. 4
0
 public ValueLoader(CacheEntry owningEntry)
 {
     CacheEntry = owningEntry;
 }
Esempio n. 5
0
 public EntryStats(CacheEntry entry)
 {
     _cacheEntry = entry;
 }