A new community contribution has been featured on Filament Mastery - a great resource for those building with Filamentphp.
π filamentmastery.com/community-links/13
Thanks to @ASSEM for the continued inspiration!
#filamentphp #Laravel #PHP #DevCommunity
Laravel Performance Tip π
Stop hitting the cache twice! Many devs do `Cache::has()` before `Cache::get()` - but that doubles the work for the same key.
Benchmarks say it all:
- β± Execution: 14ms β 6ms
- π§ Memory: 47MB β 43MB
- π Cache calls: 2 β 1
β
Fix: skip `has()`, just `get()` and check for null:
$value = Cache::get($key);
if ($value !== null) return $value;
Tiny tweak, huge impact under load. Full examples and results in the article!
dev.to/tegos/laravel-cache-tip-avoid-redundant-hasmissing-calls-4hi1
#Laravel #PHP #LaravelTips
Found a way to have #laravel provide a list of domains to #traefik via the http provider.
Would anyone be interested in reading the code or a blog article for that?
#programming #webdeveloper #php