Example #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();
             }
        }
Example #2
0
 public CacheValueLoader(CacheEntry owningEntry)
     : base(owningEntry)
 {
 }
Example #3
0
 public LiveValueLoader(CacheEntry entry)
     : base(entry)
 {
 }
Example #4
0
 public ValueLoader(CacheEntry owningEntry)
 {
     CacheEntry = owningEntry;
 }
Example #5
0
 public EntryStats(CacheEntry entry)
 {
     _cacheEntry = entry;
 }