StacheUpdated

Statamic\Events\StacheUpdated

Fired when the Stache is updated (ie. when content, assets, or users are created/modified) this will be fired.

public $events = [StacheUpdated::class => 'handle'];

public function handle(StacheUpdated $event)
{
    $event->stache; // Statamic\Contracts\Stache\Cache
    $event->updates; // \Illuminate\Support\Collection of repos that were updated
    $event->updated($repo); // Check if a given repo was updated
    $event->updatedAny($repos); // Check if any given repos were updated
}
Last modified on July 17, 2018