Skip to content

Commit

Permalink
Remove statamic-cache dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvesterdamgaard committed Sep 11, 2024
1 parent 17d2bf4 commit 0f6f2c6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
"require": {
"php": "^8.2",
"spatie/eloquent-sortable": "^4.0",
"statamic/cms": "^4.0 || ^5.0",
"tv2regionerne/statamic-cache": "dev-main"
"statamic/cms": "^4.0 || ^5.0"
},
"require-dev": {
"laravel/pint": "^1.13",
Expand Down
16 changes: 0 additions & 16 deletions src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use Statamic\Facades\Permission;
use Statamic\Http\View\Composers\FieldComposer;
use Statamic\Providers\AddonServiceProvider;
use Tv2regionerne\StatamicCache\Facades\Store as CacheStore;
use Tv2regionerne\StatamicCuratedCollection\Commands\RunAutomation;
use Tv2regionerne\StatamicCuratedCollection\Filters\ActiveStatus;
use Tv2regionerne\StatamicCuratedCollection\Http\Controllers\Api\CuratedCollectionController;
Expand Down Expand Up @@ -155,21 +154,6 @@ private function bootApi(): self
return $this;
}

private function bootCache(): self
{
if (class_exists(CacheStore::class)) {
Event::listen(function (Events\CuratedCollectionTagEvent $event) {
CacheStore::mergeTags(['curated_collections:'.$event->tag]);
});

Event::listen(function (Events\CuratedCollectionUpdatedEvent $event) {
\Tv2regionerne\StatamicCache\Facades\Store::invalidateContent(['curated_collections:'.$event->handle]);
});
}

return $this;
}

private function bootBroadcasting()
{
Broadcast::channel('curated-collections-private.{handle}', function ($user, string $id) {
Expand Down

0 comments on commit 0f6f2c6

Please sign in to comment.