-
-
Notifications
You must be signed in to change notification settings - Fork 480
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
Command to warm the static cache #3745
Conversation
@jasonvarga is this likely to get accepted? If so, I'll tidy up to not do the concurrency on Laravel < 8 and make some tests. |
Note to self, version check would look like Spatie's |
FWIW I remember Jason saying he'd love this in core when it also does taxonomies and custom routes. |
I'd be fine with this, even if it's only supported on Laravel 8. |
Note to self, copy the url generation from the SSG: https://github.com/statamic/ssg/blob/f723c48e3d27535be73c1b4e225f653981d6459e/src/Generator.php#L203 |
Bumps [underscore](https://github.com/jashkenas/underscore) from 1.9.2 to 1.12.1. - [Release notes](https://github.com/jashkenas/underscore/releases) - [Commits](jashkenas/underscore@1.9.2...1.12.1) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ll/cms into feature/warm-static-cache # Conflicts: # src/Console/Commands/StaticWarm.php
You mentioned to me that you'd open a new PR that doesn't have the merge mess. I'm closing this and look forward to the new version. 😄 I'm definitely okay with this being a Laravel 8 only feature, like what we did with default passwords. You could just throw an exception and say sorry. |
Took this from @robdekort's Peak Starter Kit. Believe he got it from Jason.
This warms the static cache by visiting all the entry pages.
At the moment, it does not do taxonomy pages, nor custom routes, though those could be added.
It currently uses the HTTP Client's
Pool
ability to run the requests concurrently. This is part of Laravel 8 only, but if this PR would be accepted, I'll update to either handle the concurrency differently or not do it on Laravel < 8.