Angaben zum Datum
Datum aus der Quelle.
Erstmals gesehen am .
Socialite: Optionale Unique-Indexing-Jobs gegen doppeltes Scout-Reindexing
Die neuen optionalen Job-Varianten MakeSearchableUnique und RemoveFromSearchUnique stellen sicher, dass pro Modell nur ein Indexierungs-Job in der Queue liegt, und erfordern einen Standard-Cache-Store.
Pull request by @stevebauman
If the same model gets saved multiple times in quick succession, Scout can end up queuing redundant indexing jobs for it. The new unique job variants - MakeSearchableUnique and RemoveFromSearchUnique - implement ShouldBeUniqueUntilProcessing, so only one job per model sits in the queue at a time. Opt in by registering them in a service provider.
use Laravel\Scout\Scout;
use Laravel\Scout\Jobs\MakeSearchableUnique;
use Laravel\Scout\Jobs\RemoveFromSearchUnique;
Scout::makeSearchableUsing(MakeSearchableUnique::class);
Scout::removeFromSearchUsing(RemoveFromSearchUnique::class);
These require a default cache store, so they're opt-in rather than the new default.