diff --git a/src/Entries/Collection.php b/src/Entries/Collection.php index 760e6ceadc0..179389248e2 100644 --- a/src/Entries/Collection.php +++ b/src/Entries/Collection.php @@ -482,6 +482,8 @@ public function save() { $isNew = ! Facades\Collection::handleExists($this->handle); + Blink::forget("collection-{$this->id()}-structure"); + $withEvents = $this->withEvents; $this->withEvents = true; diff --git a/tests/Data/Entries/CollectionTest.php b/tests/Data/Entries/CollectionTest.php index 7f1a01943d4..44060a0d9af 100644 --- a/tests/Data/Entries/CollectionTest.php +++ b/tests/Data/Entries/CollectionTest.php @@ -501,6 +501,7 @@ public function it_saves_the_collection_through_the_api() Facades\Collection::shouldReceive('save')->with($collection)->once(); Facades\Collection::shouldReceive('handleExists')->with('test')->once(); + Facades\Blink::shouldReceive('forget')->with('collection-test-structure')->once(); Facades\Blink::shouldReceive('forget')->with('collection-handles')->once(); Facades\Blink::shouldReceive('forget')->with('mounted-collections')->once(); Facades\Blink::shouldReceive('flushStartingWith')->with('collection-test')->once();