Files
steves-bot/src/src/StevesBot.Webhook/YouTube/ILastPostedStreamStore.cs
T
Stevan Freeborn 7826e835ef feat(youtube): multiple stream notifications
Refactors the notification storage to support multiple stream IDs
using a ConcurrentDictionary. This ensures that the bot can track and
ignore duplicate notifications for multiple streams within a
rolling 24-hour window, rather than only tracking the single most
recent stream.

- Updated ILastPostedStreamStore to include RemoveValuesOlderThan24Hours.
- Switched LastPostedStreamStore to use ConcurrentDictionary with UTC timestamps.
- Injected TimeProvider to enable deterministic testing of time-based expiration.
- Added automatic cache pruning in NotificationHandler on every request.
- Renamed Unit/LastPostedStreamStore.cs to Unit/LastPostedStreamStoreTests.cs and expanded test coverage.
2026-01-11 10:32:57 -06:00

8 lines
184 B
C#

namespace StevesBot.Webhook.YouTube;
internal interface ILastPostedStreamStore
{
void SetValue(string value);
bool HasValue(string value);
void RemoveValuesOlderThan24Hours();
}