Skip to content

Conversation

@AlexVanderbist
Copy link
Member

Refresh connection resolver for models after switching database

Model::$resolver contains a db instance with a database name. After switching to a different database, the db instance in the Model::$resolver should also be updated to the newly configured db instance. This fixes route model binding on Laravel Octane.

Fix cache prefixes not being updated

Simply calling Cache::forgetDriver() isn't enough to update cache prefixes everywhere. The CacheManager also keeps a copy of the old config in cache and the Cache facade itself keeps an old copy of the CacheManager. All of these should be cleared and forgotten after switching cache configs.

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

Successfully merging this pull request may close these issues.

2 participants