Skip to content

Commit

Permalink
Set manually the widget's update date on update to force cache invali…
Browse files Browse the repository at this point in the history
…dation
  • Loading branch information
Leny BERNARD authored and lenybernard committed Oct 7, 2016
1 parent 14e8e47 commit 0316b96
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Bundle/WidgetBundle/Model/WidgetManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ public function editWidget(Request $request, Widget $widget, View $currentView,
if ($noValidate === false && $form->isValid()) {
$widget->setBusinessEntityId($businessEntityId);

//force cache invalidation
$widget->setUpdatedAt(new \DateTime());
$this->entityManager->persist($widget);

$this->entityManager->persist($currentView);
Expand Down

0 comments on commit 0316b96

Please sign in to comment.