Files
clinch/app/models
Dan Milne 6844c5fab3 Clean up forward auth caching: remove duplication, fix rate limiting, and plug cache gaps
- Remove duplicated app_allows_user_cached?/headers_for_user_cached methods; call model methods directly
- Fix sliding-window rate limit bug by using increment instead of write (avoids TTL reset)
- Use cached app lookup in validate_redirect_url instead of hitting DB on every unauthorized request
- Add cache busting to ApplicationGroup so group assignment changes invalidate the cache
- Eager-load user groups (includes(user: :groups)) to eliminate N+1 queries
- Replace pluck(:name) with map(&:name) to use already-loaded associations
- Remove hardcoded fallback domain, dead methods, and unnecessary comments
- Fix test indentation and make group-order assertions deterministic

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 23:54:19 +11:00
..
2025-10-23 16:19:56 +11:00
2026-01-01 13:29:44 +11:00
2025-10-23 16:45:00 +11:00
2026-01-01 13:29:44 +11:00
2026-01-01 13:29:44 +11:00
2026-01-05 12:00:29 +11:00
2026-01-01 13:29:44 +11:00
2026-01-05 12:00:29 +11:00
2025-10-23 16:45:00 +11:00
2026-01-01 13:29:44 +11:00