<?php

declare(strict_types=1);

namespace App\Framework\Cache\Warming\ValueObjects;

/**
 * Priority levels for cache warmup strategies
 */
enum WarmupPriority: int
{
    case CRITICAL = 1000;  // Routes, config - must warm first
    case HIGH = 500;       // Frequent database queries
    case MEDIUM = 250;     // Session data, templates
    case LOW = 100;        // Less frequently accessed data
    case BACKGROUND = 0;   // Nice-to-have, run when idle

    public function getDescription(): string
    {
        return match ($this) {
            self::CRITICAL => 'Critical application data (routes, config)',
            self::HIGH => 'Frequently accessed data (popular queries)',
            self::MEDIUM => 'Moderately accessed data (templates, session)',
            self::LOW => 'Infrequently accessed data',
            self::BACKGROUND => 'Background optimization (predictive)',
        };
    }
}
