You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Since
Registry::setCache()
is only called onRegistry::__construct()
, any non-reloading instance of the app (i.e.php artisan tinker
orphp 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.
The text was updated successfully, but these errors were encountered: