Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Plugins/org.secc.FamilyCheckin/Cache/CheckinCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,11 @@ private static List<string> UpdateKeys( Func<List<string>> keyFactory, string en
var now = DateTime.UtcNow;
var currentKeys = AllKeys();

// If within throttle window and we have existing keys
if ( currentKeys.Any() && ( now - _lastKeysRefreshUtc ) < KeysRefreshInterval )
// If within the throttle window, serve the cached key list as-is.
// An empty list is a valid answer (e.g. overnight, before the day's first
// check-in) and must still be throttled -- otherwise every caller re-runs
// the key query, which is a full scan of Attendance returning no rows.
Comment on lines +179 to +182
if ( ( now - _lastKeysRefreshUtc ) < KeysRefreshInterval )
{
bool modified = false;

Expand Down