Skip to content

Commit b28e030

Browse files
authored
[Fix] Carbon v3 new method default parameter compatibility (#469)
1 parent 44b0772 commit b28e030

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Traits/Caching.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ protected function checkCooldownAndRemoveIfExpired(Model $instance)
241241

242242
if (
243243
! $cacheCooldown
244-
|| (new Carbon)->now()->diffInSeconds($invalidatedAt) < $cacheCooldown
244+
|| (new Carbon)->now()->diffInSeconds($invalidatedAt, true) < $cacheCooldown
245245
) {
246246
return;
247247
}
@@ -285,7 +285,7 @@ protected function checkCooldownAndFlushAfterPersisting(Model $instance, string
285285

286286
$this->setCacheCooldownSavedAtTimestamp($instance);
287287

288-
if ((new Carbon)->now()->diffInSeconds($invalidatedAt) >= $cacheCooldown) {
288+
if ((new Carbon)->now()->diffInSeconds($invalidatedAt, true) >= $cacheCooldown) {
289289
$instance->flushCache();
290290

291291
if ($relationship) {

0 commit comments

Comments
 (0)