Skip to content

Commit

Permalink
Clear the element cache if an element was moved
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-lenz committed Jul 23, 2019
1 parent c69577e commit 058ed26
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/elementCache/ElementCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
use Craft;
use craft\base\Element;
use craft\base\ElementInterface;
use craft\events\ElementEvent;
use craft\events\RegisterCacheOptionsEvent;
use craft\services\Elements;
use craft\services\Structures;
use craft\utilities\ClearCaches;
use Throwable;
use yii\base\Event;
Expand Down Expand Up @@ -56,6 +56,7 @@ public function __construct() {
Event::on(Elements::class, Elements::EVENT_AFTER_SAVE_ELEMENT, $listener);
Event::on(Elements::class, Elements::EVENT_AFTER_DELETE_ELEMENT, $listener);
Event::on(Elements::class, Elements::EVENT_AFTER_MERGE_ELEMENTS, $listener);
Event::on(Structures::class, Structures::EVENT_AFTER_MOVE_ELEMENT, $listener);
}

/**
Expand Down

0 comments on commit 058ed26

Please sign in to comment.