@@ -498,7 +498,8 @@ class DishTable extends PowerGridComponent
498
498
public function setUp(): array
499
499
{
500
500
return [
501
- PowerGrid::cache()// [!code ++:3]
501
+ PowerGrid::cache() // [!code ++:3]
502
+ ->ttl(60) // [!code ++:3]
502
503
->prefix(auth()->id . '_'), //result: 1_powergrid-dish-DishTable
503
504
]
504
505
}
@@ -514,6 +515,7 @@ public function setUp(): array
514
515
{
515
516
return [
516
517
PowerGrid::cache()// [!code ++:3]
518
+ ->ttl(60) // [!code ++:3]
517
519
->customTag('my-custom-tag'),
518
520
]
519
521
}
@@ -556,12 +558,12 @@ class Dish extends Model
556
558
557
559
Here you can find all the methods available in the ` LivewirePowerGrid\Cache ` class.
558
560
559
- | Method | Description |
560
- | -------| --------------|
561
- | ` ttl() ` | Maximum time in seconds for which the data can be cached. |
562
- | ` customTag() ` | Allows you to set a custom cache tag. |
563
- | ` prefix() ` | Sets a prefix for the cache tag. |
564
- | ` disabled() ` | Disables cache. |
561
+ | Method | Description |
562
+ | -------------------------- | --------------------------------------------- --------------|
563
+ | ` ttl() ` (required) | Maximum time in seconds for which the data can be cached. |
564
+ | ` customTag() ` (optional) | Allows you to set a custom cache tag. |
565
+ | ` prefix() ` (optional) | Sets a prefix for the cache tag. |
566
+ | ` disabled() ` (optional) | Disables cache. |
565
567
566
568
## Events
567
569
0 commit comments