Skip to content

Commit

Permalink
Fixed an issue where the discussion list API was not cleared after ad…
Browse files Browse the repository at this point in the history
…ding a new discussion
  • Loading branch information
rafaucau committed Nov 29, 2021
1 parent 0decd66 commit 1e227e6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/Middleware/LSCachePurgeMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface

// If this is a post update, we don't need to clear the home page cache
if ($routeName !== 'posts.update') {
array_push($purgeParams, 'tag=default', 'tag=index');
array_push($purgeParams, 'tag=default', 'tag=index', 'tag=discussions.index');
}
}

Expand All @@ -73,9 +73,6 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
if ($postId) {
$discussionId = Post::find($postId)->discussion_id;
}
} else {
// When a new post is added
array_push($purgeParams, 'tag=discussions.index');
}

if ($discussionId) {
Expand Down

0 comments on commit 1e227e6

Please sign in to comment.