| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 12 | public static function dispatch(string $model, string $name, string $queueConnection, string $queueName, int $wait = 5): void |
||
| 13 | { |
||
| 14 | $key = "laracache.debounce.$model:token"; |
||
| 15 | |||
| 16 | $token = Str::uuid()->toString(); |
||
| 17 | $ttl = $wait + 60; |
||
| 18 | |||
| 19 | Cache::put($key, $token, $ttl); |
||
| 20 | |||
| 21 | DebounceRefresh::dispatch($key, $token, $model, $name) |
||
| 22 | ->onConnection($queueConnection) |
||
| 23 | ->onQueue($queueName) |
||
| 24 | ->delay($wait); |
||
| 25 | } |
||
| 27 |