wp-media / wp-rocket-cli

WP CLI interface for the WP Rocket plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cache generation process is not sync

MaximeCulea opened this issue · comments

I have just launched the rocket preload command, and it went like light, too quick. Whereas in my dashboard I am just to 16 pages cached on 100.

Is there a way to visually show the advancement?

Reproduce the problem

Yes, it is noticeable while running the command.
However this is the expected behaviour as the command will simply start the homepage bot using the command run_rocket_bot() . This process will simply run the Homepage preload and start the homepage preload process and dispatch it.

Scope a solution

The solution in here will be to clarify exactly what preload command does exactly. It simply starts the homepage preload process and does not wait to be finished.
Probably renaming the command to start_preload would be sufficient.

Additional

As I noticed only Homepage preload process is started. I assume it would be beneficial to some customers to add also sitemap preload to this command or to create another command to handle the sitemap preload.

There could be other solutions, however because the Preload system is fragile and there is a plan to rewrite it in the future, my opinion is that we should not spend too much time on this and we shall reconsider visiting this part when new preload system is ready.