Skip to content

Commit d33ffb1

Browse files
update docs
1 parent eca4699 commit d33ffb1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -857,6 +857,20 @@ You can always clear the cached settings with the following command:
857857
php artisan settings:clear-cache
858858
```
859859

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+
860874
### Auto discovering settings classes
861875

862876
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

Comments
 (0)