Skip to content

Commit

Permalink
Exclude operation alerts from removePageFromVarnish
Browse files Browse the repository at this point in the history
MIMIR-1890
  • Loading branch information
johnnadeluy committed Oct 16, 2023
1 parent b3326aa commit d47d63e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/resources/lib/ssb/cache/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,13 @@ function alertsClearVarnishCache(event: EnonicEvent<EnonicEventData>): void {

function removePageFromVarnish(event: EnonicEvent<EnonicEventData>): void {
const pageIds: string[] = event.data.nodes
.filter((n) => n.repo == 'com.enonic.cms.default' && n.branch == 'master' && n.path.startsWith('/content/'))
.filter(
(n) =>
n.repo == 'com.enonic.cms.default' &&
n.branch == 'master' &&
n.path.startsWith('/content/') &&
!n.path.includes('/driftsvarsler/')
)
.map((n) => n.id)

if (pageIds.length > 0) {
Expand Down

0 comments on commit d47d63e

Please sign in to comment.