- Added MTG card ORM models (mtg_cards, mtg_sets tables) - Created card_database service with search, get_by_name, get_by_set - Added Redis client with caching layer (3600s TTL default) - Created card router with caching on all endpoints: - Search cards (5min cache) - Get card by name (10min cache) - Get cards by set (15min cache) - Get card types/rarities (30min cache) - Get sets (1hr cache) - Get statistics (1hr cache) - Updated settings.py: - Added JWT_SECRET_KEY field - Added DB_CONFIG and REDIS_CONFIG dictionaries - Updated security.py to use JWT_SECRET_KEY with fallback - Updated auth.py to use timezone-aware datetimes - Updated refresh_mtg.py to use settings instead of os.environ - Updated mtg_monitor.py to use settings for connections - Added services package with __init__.py All 20 tests passing.
17 lines
513 B
Plaintext
17 lines
513 B
Plaintext
# PostgreSQL Configuration for MTG Database
|
|
|
|
# postgresql.conf - optimize for mtgjson workload
|
|
shared_buffers = 256MB
|
|
effective_cache_size = 1GB
|
|
work_mem = 16MB
|
|
maintenance_work_mem = 256MB
|
|
random_page_cost = 1.1
|
|
effective_io_concurrency = 200
|
|
max_parallel_workers_per_gather = 2
|
|
max_parallel_workers = 4
|
|
max_parallel_maintenance_workers = 2
|
|
|
|
# pg_hba.conf - allow connections
|
|
host all all 127.0.0.1/32 md5
|
|
host all all ::1/128 md5
|