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(); } }
public CacheValueLoader(CacheEntry owningEntry) : base(owningEntry) { }
public LiveValueLoader(CacheEntry entry) : base(entry) { }
public ValueLoader(CacheEntry owningEntry) { CacheEntry = owningEntry; }
public EntryStats(CacheEntry entry) { _cacheEntry = entry; }