<?php

declare(strict_types=1);

namespace App\Framework\View\Caching\Strategies;

use App\Framework\Cache\CacheKey;
use App\Framework\View\Caching\TemplateContext;

interface ViewCacheStrategy
{
    public function shouldCache(TemplateContext $context): bool;

    public function generateKey(TemplateContext $context): CacheKey;

    public function getTtl(TemplateContext $context): int;

    public function canInvalidate(string $template): bool;
}
