Skip to content

Commit

Permalink
Fix typo + event instead of entry (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
martink635 authored Apr 5, 2024
1 parent 824fb62 commit ba58a8e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/SitemapSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Statamic\Events\EntryDeleted;
use Illuminate\Events\Dispatcher;
use Illuminate\Support\Facades\Cache;
use Statamic\Entries\Entry;

class SitemapSubscriber
{
Expand All @@ -29,10 +28,10 @@ public function subscribe(Dispatcher $events): array
* Flush the sitemap cache
*
*/
public function flushSitemapCache(Entry $entry)
public function flushSitemapCache($event)
{
Cache::forget('seotamic_sitemap_should_be_indexed' . $entry->id());
Cache::forge('seotamic_sitemap_sitemap_entry', $entry->id());
Cache::forget('seotamic_sitemap_should_be_indexed' . $event->entry->id());
Cache::forget('seotamic_sitemap_sitemap_entry', $event->entry->id());
Cache::forget('seotamic_sitemap');
}
}

0 comments on commit ba58a8e

Please sign in to comment.