Angaben zum Datum
Datum aus der Quelle.
Erstmals gesehen am .
Laravel 12.x: BackedEnum für Cache-Keys erlaubt
Backed Enums lassen sich nun auch als Cache-Keys verwenden.
Pull request by @jackbayliss
Same productivity boost, now for cache: backed enums can be used as cache keys, helping you standardize key naming and avoid subtle collisions. Great fit for teams that want a single source of truth for cache identifiers.
enum CacheKey: string
{
case Settings = 'settings.global';
}
Cache::put(CacheKey::Settings, $settings, now()->addHour());
$settings = Cache::get(CacheKey::Settings);