berrypod/test
jamey 297f3de60f
All checks were successful
deploy / deploy (push) Successful in 1m26s
cache settings, categories, and media in ETS to cut per-request DB queries
Every shop page load was triggering ~18 DB queries for data that rarely
changes (theme settings, nav items, categories, shipping countries, logo,
header image). On a shared-cpu-1x Fly machine with SQLite this was the
primary performance bottleneck.

- Add SettingsCache GenServer+ETS for all non-encrypted settings
- Cache list_categories() with single-query N+1 fix (correlated subquery)
- Cache list_available_countries_with_names() in shipping
- Cache Media.get_logo() and Media.get_header()
- Remove duplicate LoadTheme plug from :shop and :admin pipelines
- Invalidate caches on writes (put_setting, product sync, media upload)
- Clear caches between tests via DataCase/ConnCase setup

Per-page queries reduced from ~18 to ~2.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 16:25:29 +00:00
..
berrypod fix CSS nesting warnings and test type warnings 2026-03-02 01:02:24 +00:00
berrypod_web hide system events by default on activity page 2026-03-02 08:32:06 +00:00
fixtures feat: add image optimizer module 2026-01-21 22:16:21 +00:00
support cache settings, categories, and media in ETS to cut per-request DB queries 2026-03-02 16:25:29 +00:00
test_helper.exs add URL redirects with ETS-cached plug, broken URL tracking, and admin UI 2026-02-26 14:14:14 +00:00