chore: complete update

This commit is contained in:
2025-07-17 16:24:20 +02:00
parent 899227b0a4
commit 64a7051137
1300 changed files with 85570 additions and 2756 deletions

View File

@@ -0,0 +1,49 @@
<?php
namespace Archive\Optimized;
/**
* Cache-Strategien für Templates
*/
enum CacheStrategy: string
{
case STATIC = 'static'; // Vollständig statischer Content
case PARTIAL = 'partial'; // Teilweise dynamischer Content
case FRAGMENT = 'fragment'; // Fragment-basiertes Caching
case DYNAMIC = 'dynamic'; // Kein Caching (vollständig dynamisch)
public function getTtl(): int
{
return match($this) {
self::STATIC => 3600, // 1 Stunde
self::PARTIAL => 900, // 15 Minuten
self::FRAGMENT => 600, // 10 Minuten
self::DYNAMIC => 0, // Kein Caching
};
}
public function getPriority(): int
{
return match($this) {
self::STATIC => 1, // Höchste Priorität
self::PARTIAL => 2,
self::FRAGMENT => 3,
self::DYNAMIC => 4, // Niedrigste Priorität
};
}
public function shouldCache(): bool
{
return $this !== self::DYNAMIC;
}
public function getDescription(): string
{
return match($this) {
self::STATIC => 'Fully cacheable static content',
self::PARTIAL => 'Partially cacheable with some dynamic elements',
self::FRAGMENT => 'Fragment-based caching for mixed content',
self::DYNAMIC => 'Fully dynamic content, no caching',
};
}
}