Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[11.x] Unify prefetch API #52550

Merged
merged 1 commit into from
Aug 22, 2024
Merged

[11.x] Unify prefetch API #52550

merged 1 commit into from
Aug 22, 2024

Conversation

timacdonald
Copy link
Member

Unify the prefetching API.

// Waterfall with 3 active requests...
Vite::prefetch(concurrency: 3);

// Everything all at once...
Vite::prefetch();

@taylorotwell taylorotwell merged commit 401f026 into laravel:11.x Aug 22, 2024
31 checks passed
@timacdonald timacdonald deleted the unify-api branch August 22, 2024 22:34
Comment on lines +293 to +294
? $this->usePrefetchStrategy('aggressive')
: $this->usePrefetchStrategy('waterfall', ['concurrency' => $concurrency]);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
? $this->usePrefetchStrategy('aggressive')
: $this->usePrefetchStrategy('waterfall', ['concurrency' => $concurrency]);
? $this->useAggressivePrefetching()
: $this->useWaterfallPrefetching($concurrency);

While this works, it would've been a good idea to use these methods the class already provides.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants