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

Is there any way to refresh() cache for all tenants #656

Open
77media-creations opened this issue Aug 2, 2024 · 0 comments
Open

Is there any way to refresh() cache for all tenants #656

77media-creations opened this issue Aug 2, 2024 · 0 comments

Comments

@77media-creations
Copy link

77media-creations commented Aug 2, 2024

I'm using tenant_id for scopes in the middleware (Laravel application).

Currently, when refreshing the cache using Bouncer::refresh(), it refreshes for the users in the current tenant scope only.
To refresh for all the users in each tenant, I have to iterate it something like below:

foreach $tenants as $tenant) {
    Bouncer::scope()->to($tenant->id);
    Bouncer::refresh();
}

Is there any way to refresh the cache for all users regardless of the scope?

Or is there any chance to configure a default time for the cache such as 24hrs?

@77media-creations 77media-creations changed the title Is there any way to refresh() cache for all scoped tenants Is there any way to refresh() cache for all tenants Aug 3, 2024
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