isFile() && preg_match('/\.jpe?g$/i', $file->getFilename())) { get_exif_cached($file->getPathname(), $CONFIG['exif_dir'], 0); $count++; } } echo "โœ… Rebuilt EXIF cache for {$count} images."; break; case 'clean_thumbs': $thumb_dir = $CONFIG['thumb_dir']; $removed = 0; foreach (glob($thumb_dir . '/*.jpg') as $t) { unlink($t); $removed++; } echo "๐Ÿงน Removed {$removed} thumbnails."; break; case 'restart_php': shell_exec('pgrep php-fpm | xargs kill -USR2 2>/dev/null'); echo "๐Ÿ”„ PHP-FPM reload signal sent."; break; default: echo "Unknown action."; }