Add simple caching implementation for database queries that will be used in command autocompletion

This commit is contained in:
stijndcl 2022-07-14 22:44:22 +02:00
parent f0a05c8b4d
commit 72c3acbcc2
9 changed files with 162 additions and 50 deletions

View file

@ -5,6 +5,8 @@ from sqlalchemy.ext.asyncio import AsyncSession
from database.models import UforaCourse, UforaCourseAlias
__all__ = ["get_all_courses", "get_course_by_name"]
async def get_all_courses(session: AsyncSession) -> list[UforaCourse]:
"""Get a list of all courses in the database"""