File manager - Edit - /var/www/html/portalHomolog/app/Http/Services/Observatorio/ObservatorioPublicCacheService.php
Back
<?php namespace App\Http\Services\Observatorio; use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Log; /** * Limpa o cache do site público (observaangra) após alterações no admin. */ class ObservatorioPublicCacheService { public static function clear(): void { $url = (string) config('observatorio.public_cache_clear_url'); $token = (string) config('observatorio.public_cache_clear_token'); if ($url === '' || $token === '') { return; } try { Http::timeout(5) ->withHeaders(['X-Observatorio-Token' => $token]) ->post($url); } catch (\Throwable $e) { Log::warning('Falha ao limpar cache do site público do Observatório', [ 'message' => $e->getMessage(), ]); } } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings