Skip to content

Commit 509cb42

Browse files
Fix Cache::ttl docs
1 parent ae075b2 commit 509cb42

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

docs/table-component/component-configuration.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,8 @@ class DishTable extends PowerGridComponent
498498
public function setUp(): array
499499
{
500500
return [
501-
PowerGrid::cache()// [!code ++:3]
501+
PowerGrid::cache() // [!code ++:3]
502+
->ttl(60) // [!code ++:3]
502503
->prefix(auth()->id . '_'), //result: 1_powergrid-dish-DishTable
503504
]
504505
}
@@ -514,6 +515,7 @@ public function setUp(): array
514515
{
515516
return [
516517
PowerGrid::cache()// [!code ++:3]
518+
->ttl(60) // [!code ++:3]
517519
->customTag('my-custom-tag'),
518520
]
519521
}
@@ -556,12 +558,12 @@ class Dish extends Model
556558

557559
Here you can find all the methods available in the `LivewirePowerGrid\Cache` class.
558560

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. |
565567

566568
## Events
567569

0 commit comments

Comments
 (0)