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

Clearing too many instances? #308

Open
kavihGB opened this issue Jan 7, 2025 · 0 comments
Open

Clearing too many instances? #308

kavihGB opened this issue Jan 7, 2025 · 0 comments

Comments

@kavihGB
Copy link

kavihGB commented Jan 7, 2025

Is it really necessary to clear all facade instances from within Stancl\Tenancy\Bootstrappers\CacheTenancyBootstrapper:: resetFacadeCache? Couldn't the method be changed from:

public function resetFacadeCache()
{
    Cache::clearResolvedInstances();
}

to

public function resetFacadeCache()
{
    Facade::clearResolvedInstance('cache');
}

With the bootstrapper the way it is now, running $tenant->run() will clear all resolved facades, not just the cache facade, which seems like a bug at first glance. Especially if wanting to run things in tenants from central and still expect central to have its resolved facades after the fact.

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