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
see, i create a CacheServiceProvider with php artisan make:provider CacheServiceProvider...
in boot()
{
Cache::extend('redis_tenancy', function ($app) {
if (PHP_SAPI === 'cli') {
$uuid = $app['config']['driver'];
} else {
// ok, this is basically a hack to set the redis cache store
// prefix to the UUID of the current website being called
$fqdn = request()->getHost();
$uuid = DB::table('hostnames')
->select('websites.uuid')
->join('websites', 'hostnames.website_id', '=', 'websites.id')
->where('fqdn', $fqdn)
``` ->value('uuid');
}
return Cache::repository(new RedisStore(
$app['redis'],
$uuid,
$app['config']['cache.stores.redis.connection']
));
});
}
in config/cache.php edit the redis to
the problem for example is... if i put manually 1 tenant in maintenance mode in database... i need delete cache to refresh and see the tenant 2 for example in maintenance mode... and delete the date in database and clean again
to see online the tenant again.
else i use the comand tenancy:down -tenant=2... all tenants are offline..
The text was updated successfully, but these errors were encountered:
Helloo! im having problem with a cache..
see, i create a CacheServiceProvider with php artisan make:provider CacheServiceProvider...
'redis' => [
'driver' => 'redis_tenancy',
'connection' => 'default',
],
The text was updated successfully, but these errors were encountered: