Skip to content

Commit

Permalink
Clear Sitemapamic cache on Entry/Term Delete
Browse files Browse the repository at this point in the history
Signed-off-by: Marty Friedel <[email protected]>
  • Loading branch information
martyf committed May 16, 2022
1 parent b1b850d commit 5f9f776
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

use MityDigital\Sitemapamic\Listeners\ClearSitemapamicCache;
use MityDigital\Sitemapamic\Commands\ClearSitemapamicCacheCommand;
use Statamic\Events\EntryDeleted;
use Statamic\Events\EntrySaved;
use Statamic\Events\TermDeleted;
use Statamic\Events\TermSaved;
use Statamic\Providers\AddonServiceProvider;

Expand All @@ -21,9 +23,15 @@ class ServiceProvider extends AddonServiceProvider
];

protected $listen = [
EntryDeleted::class => [
ClearSitemapamicCache::class,
],
EntrySaved::class => [
ClearSitemapamicCache::class,
],
TermDeleted::class => [
ClearSitemapamicCache::class,
],
TermSaved::class => [
ClearSitemapamicCache::class,
],
Expand Down

0 comments on commit 5f9f776

Please sign in to comment.