Skip to content

Commit 0982e3f

Browse files
Merge pull request #325 from unusualify/hotfix/assigned-prs-not-appearing-for-non-admin-users-issue-323
fix(CacheObserver): refresh model before invalidating cache to ensure…
2 parents 39d560a + 2a90e55 commit 0982e3f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Entities/Observers/CacheObserver.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ public function updated(Model $model): void
5555
}
5656

5757
if (ModularityCache::isEnabled($this->getModuleNameFromModel($model), $this->getModuleRouteNameFromModel($model))) {
58-
ModularityCache::invalidateForModel($model);
58+
$clone = clone $model;
59+
$clone->refresh();
60+
ModularityCache::invalidateForModel($clone);
5961
}
6062

6163
// Invalidate caches of modules that depend on this model

0 commit comments

Comments
 (0)