Problem:
- Cache::remember() does not cache null return values
- When no FQDN was configured, the closure returned null
- This caused DB queries on every request, defeating the cache
Solution:
- Use empty string ('') as sentinel value instead of null
- Convert sentinel back to null after retrieving from cache
- Now both positive and negative results are cached properly
Changes:
- Return empty string from closure instead of null
- Add explicit sentinel-to-null conversion after cache retrieval
- Add test to verify negative caching works correctly
This ensures zero DB queries even when FQDN is not configured.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| ApiAbility.php | ||
| ApiAllowed.php | ||
| ApiSensitiveData.php | ||
| Authenticate.php | ||
| CanAccessTerminal.php | ||
| CanCreateResources.php | ||
| CanUpdateResource.php | ||
| CheckForcePasswordReset.php | ||
| DecideWhatToDoWithUser.php | ||
| EncryptCookies.php | ||
| PreventRequestsDuringMaintenance.php | ||
| RedirectIfAuthenticated.php | ||
| TrimStrings.php | ||
| TrustHosts.php | ||
| TrustProxies.php | ||
| ValidateSignature.php | ||
| VerifyCsrfToken.php | ||