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>
|
||
|---|---|---|
| .. | ||
| Actions | ||
| Console | ||
| Contracts | ||
| Data | ||
| Enums | ||
| Events | ||
| Exceptions | ||
| Helpers | ||
| Http | ||
| Jobs | ||
| Listeners | ||
| Livewire | ||
| Models | ||
| Notifications | ||
| Policies | ||
| Providers | ||
| Repositories | ||
| Rules | ||
| Services | ||
| Support | ||
| Traits | ||
| View/Components | ||