Preload icon indicating copy to clipboard operation
Preload copied to clipboard

[2.x] New features

Open DarkGhostHunter opened this issue 2 years ago • 2 comments

This is just a list of tentative features for this package, on version 2.x, in no particular order.

  • [ ] Move list generation to a plain text file and stream each line into the preloader.
  • [ ] Allow to write the file to storage, and read the file list from that storage through an Artisan command (preload:retrieve)

You're all free to suggest new features using the issue tracker.

DarkGhostHunter avatar Oct 02 '23 16:10 DarkGhostHunter

Hi, thanks for great project! I want to share with you some case that I have. We are using kubernetes so we have different pods for queue and web app. In this case I`ve tried to set connection to sync in config, but I think this is ugly hack ). So maybe some ideas how to solve this case in correct way. Maybe some artisan command which adds all files to preloading (we can run any command in any pod). These files can be cached into redis cache during app lifetime or something more clever. Thanks!

Ferikl avatar Nov 03 '23 13:11 Ferikl

Maybe some artisan command which adds all files to preloading

I thought of that, but stats for Opcache work only for the CLI, not the live app.

Also, the list must be available as a file before PHP starts, and the only way to accomplish that is by saving that file somewhere. I can't rely on redis or else unless another app actually retrieves and writes the file.

One alternative would be to manually save the file list with the ListGenerated event, and before the main app starts, use an Artisan command to retrieve it from redis and then write the file with its contents.

DarkGhostHunter avatar Nov 05 '23 23:11 DarkGhostHunter