Skip to content

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

@77media-creations

Description

@77media-creations

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions