getCurrentRequestCountPerHour method

int getCurrentRequestCountPerHour(
  1. String domain
)

Gets the current request count for the given domain (per hour)

Implementation

int getCurrentRequestCountPerHour(String domain) {
  _requestTimestampsPerHour[domain] ??= Queue<DateTime>();
  _cleanupOldTimestamps(domain, DateTime.now());
  return _requestTimestampsPerHour[domain]!.length;
}