"""Shared MongoKeyStore singleton for the API (reuses the hunter's store)."""
from functools import lru_cache

from keystore import MongoKeyStore

from .config import settings


@lru_cache(maxsize=1)
def get_store() -> MongoKeyStore:
    return MongoKeyStore(uri=settings.mongodb_uri)
