refactor search functionality; remove deprecated services and implement new action and task classes for improved structure and maintainability
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Containers\Search\Actions;
|
||||
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class ClearStaticSearchCacheAction
|
||||
{
|
||||
const CACHE_KEY = 'static_html_index_v2';
|
||||
|
||||
public function run(): bool
|
||||
{
|
||||
try {
|
||||
Cache::forget(self::CACHE_KEY);
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
Log::error('Cache clear error: ' . $e->getMessage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user