<?php
declare(strict_types=1);

namespace Ekesto\CacheInvalidator\Core;

/**
 * Plugin-wide constants that are NOT settings-domain.
 *
 * Engine behavior, identity, and threshold constants live here.
 * Settings-specific constants (option keys, REST routes, UI handles) stay in Settings.
 */
final class Config
{
    /**
     * Post types excluded from post-type invalidation configuration.
     * These are handled directly by runtime post invalidation paths.
     */
    public const EXCLUDED_POST_TYPES = ['page', 'attachment'];

    /** Hard safety cap for relationship graph traversal depth. */
    public const MAX_RELATIONSHIP_GRAPH_DEPTH = 10;

    /** Default async delay in seconds. */
    public const DEFAULT_ASYNC_DELAY_SECONDS = 10;

    /** Batch size for async first-publish same-post-type fan-out queries/purges. */
    public const FIRST_PUBLISH_SINGLE_FANOUT_BATCH_SIZE = 200;

    /** Maximum number of pages loaded into the settings target-page selector. */
    public const TARGET_PAGE_SELECTION_LIMIT = 2000;

    /** Maximum bytes scanned per builder meta field in forms resolver. */
    public const FORMS_MAX_META_FIELD_BYTES = 1048576;

    /** Maximum number of candidates scanned per forms invalidation event. */
    public const FORMS_MAX_CANDIDATES = 300;
}
