feat(proxy-dashboard): implement ProxyDashboardCacheService to manage Traefik dashboard cache; clear cache on configuration changes and proxy actions

This commit is contained in:
Andras Bacsai
2025-06-06 19:18:32 +02:00
parent 7cc91e7a04
commit 1cdc01194b
8 changed files with 100 additions and 9 deletions

View File

@@ -6,6 +6,7 @@ use App\Actions\Proxy\CheckProxy;
use App\Actions\Proxy\StartProxy;
use App\Actions\Proxy\StopProxy;
use App\Models\Server;
use App\Services\ProxyDashboardCacheService;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeEncrypted;
use Illuminate\Contracts\Queue\ShouldQueue;
@@ -39,6 +40,9 @@ class RestartProxyJob implements ShouldBeEncrypted, ShouldQueue
StartProxy::run($this->server, force: true);
// Clear Traefik dashboard cache after proxy restart
ProxyDashboardCacheService::clearCache($this->server);
// CheckProxy::run($this->server, true);
} catch (\Throwable $e) {
return handleError($e);