You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -857,6 +857,20 @@ You can always clear the cached settings with the following command:
857
857
php artisan settings:clear-cache
858
858
```
859
859
860
+
By default, each settings class will be stored into the cache as `prefix.Fully\Qualified\ClassName`. You can override this key by implementing the `cacheKey` method in your settings class:
861
+
862
+
```php
863
+
class GeneralSettings extends Settings
864
+
{
865
+
// ...
866
+
867
+
public function cacheKey(): string
868
+
{
869
+
return 'my_custom_cache_key';
870
+
}
871
+
}
872
+
```
873
+
860
874
### Auto discovering settings classes
861
875
862
876
Each settings class you create should be added to the `settings` array within the `settings.php` config file. When you've got a lot of settings, this can be quickly forgotten.
0 commit comments