⚠️ This feature is on the roadmap but not yet implemented.
In a SaaS app where one CodeIgniter instance serves many tenants, allow each tenant to be in or out of maintenance independently:
$config->driver = 'cache';
$config->tenantResolver = static fn () => current_tenant_id();
$config->cacheKeyTemplate = 'maintenance_mode_data_{tenant}';MaintenanceService would then look up maintenance_mode_data_acme,
maintenance_mode_data_globex, etc. — one entry per tenant.
Set $cacheKey dynamically in app/Config/Maintenance.php's constructor:
public function __construct()
{
parent::__construct();
$tenant = service('tenants')->current()->slug ?? 'default';
$this->cacheKey = "maintenance_mode_data_{$tenant}";
}Caveat: this fires on every config('Maintenance') call. Cache the tenant
lookup if it's expensive.