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

Allow manual cache refresh or direct database retrieval #13

Open
wunc opened this issue Nov 10, 2015 · 0 comments
Open

Allow manual cache refresh or direct database retrieval #13

wunc opened this issue Nov 10, 2015 · 0 comments

Comments

@wunc
Copy link

wunc commented Nov 10, 2015

Since Registry::setCache() is only called on Registry::__construct(), any non-reloading instance of the app (i.e. php artisan tinker or php artisan queue:work --daemon) will not see changes made to the registry by another app instance (i.e. a web interface) after they are loaded. Tinker is not that big of a deal, but for production sites the queue daemon is. It would be nice to allow for a way to either refresh the cache or bypass it and retrieve directly from the database.

a) A simple solution would be to either make Registry::setCache() public or to provide another public method that calls it.
b) A perhaps prettier solution would be to have an optional boolean third parameter to Registry::get() to allow for non-cached calls.

What do you think? If you pick one of the above, I could probably submit a PR, but I didn't want to proceed my own way without your thoughts.

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

1 participant