import type { NotificationCacheRepository } from "../../domain/repositories/notification-cache.repository.js";

export class InMemoryNotificationCache implements NotificationCacheRepository {
  private readonly sent = new Set<string>();

  async wasSent(key: string): Promise<boolean> {
    return this.sent.has(key);
  }

  async markSent(key: string): Promise<void> {
    this.sent.add(key);
  }

  async clear(): Promise<void> {
    this.sent.clear();
  }
}