Skip to content

Commit

Permalink
fix: Discussion tag
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaucau committed Jun 16, 2023
1 parent 7b126e0 commit bfc5e2b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Middleware/LSCachePurgeMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ protected function processPurge(
if (! empty($purgeList)) {
$purgeList = explode("\n", $purgeList);
// Get only valid items
$purgeList = array_filter($purgeList, fn ($item) => Str::startsWith($item, ['/', 'tag=']));
$purgeList = array_filter($purgeList, fn($item) => Str::startsWith($item, ['/', 'tag=']));
$purgeParams = array_merge($purgeParams, $purgeList);
}

Expand All @@ -58,7 +58,7 @@ protected function processPurge(
}

if ($discussionId) {
array_push($purgeParams, "tag=discussions$discussionId", "tag=discussion$discussionId");
array_push($purgeParams, "tag=discussions_$discussionId", "tag=discussion_$discussionId");
}
}

Expand All @@ -71,7 +71,7 @@ protected function processPurge(
}

if (! empty($params) && ! empty($params['id'])) {
$purgeParams[] = "tag=$rootRouteName{$params['id']}";
$purgeParams[] = "tag={$rootRouteName}_{$params['id']}";
}
}

Expand Down

0 comments on commit bfc5e2b

Please sign in to comment.