refactor(cache): 統一 cache SOT 並啟用 gunicorn preload

ADR-017 Phase 3f-2:新增 services/cache_manager.py,讓 sales/import/export/daily/dashboard 共用同一份 in-memory cache;cache_service 改為相容 shim;Dockerfile/docker-compose 啟用 gunicorn --preload。
This commit is contained in:
OoO
2026-04-29 21:35:56 +08:00
parent 2550ab45b1
commit 13fa165ee2
10 changed files with 172 additions and 155 deletions

View File

@@ -65,4 +65,4 @@ ENV FLASK_APP=app.py
EXPOSE 80
# 啟動應用production 用 gunicorn4 workers + 300s timeout + 啟用 access/error log
CMD ["gunicorn", "--bind", "0.0.0.0:80", "--workers", "4", "--timeout", "300", "--access-logfile", "-", "--error-logfile", "-", "app:app"]
CMD ["gunicorn", "--bind", "0.0.0.0:80", "--workers", "4", "--timeout", "300", "--access-logfile", "-", "--error-logfile", "-", "--preload", "app:app"]