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

[2.x] New features #11

Open
2 tasks
DarkGhostHunter opened this issue Oct 2, 2023 · 2 comments
Open
2 tasks

[2.x] New features #11

DarkGhostHunter opened this issue Oct 2, 2023 · 2 comments

Comments

@DarkGhostHunter
Copy link
Contributor

DarkGhostHunter commented Oct 2, 2023

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 DarkGhostHunter pinned this issue Oct 2, 2023
@Ferikl
Copy link

Ferikl commented Nov 3, 2023

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!

@DarkGhostHunter
Copy link
Contributor Author

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.

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

No branches or pull requests

2 participants