We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 437615d commit bcb7f42Copy full SHA for bcb7f42
sample_fastapi/app/database/config.py
@@ -1,4 +1,5 @@
1
import logging
2
+from functools import lru_cache
3
4
from pydantic import Field
5
@@ -9,8 +10,11 @@
9
10
APP_DB_SESSION_MANAGER_KEY = "_dbsm" # Lol
11
12
13
+@lru_cache()
14
def _default_db_dsn():
- LOG.warning("Using SQLite In-memory database as `database_url` config was not specified. Content WILL be lost after shutting down the app!")
15
+ LOG.warning(
16
+ "Using SQLite In-memory database as `database_url` config was not specified. Content WILL be lost after shutting down the app!"
17
+ )
18
return "sqlite+aiosqlite:///:memory:"
19
20
0 commit comments