ver. 0.282: Banners frontend migration, Cache cleanup, Shared\Cache namespace

- Banners frontend: front\Views\Banners (new), BannerRepository +2 frontend methods,
  front\view\Site przepięty, usunięte front\factory\Banners i front\view\Banners
- Cache cleanup: eliminacja legacy class.Cache.php (file-based cache),
  13 metod front\factory przepiętych z \Cache::fetch/store na CacheHandler
- Shared\Cache namespace: CacheHandler i RedisConnection przeniesione do Shared\Cache\,
  60 odwołań CacheHandler i 12 odwołań RedisConnection przepiętych,
  usunięte backward-compat wrappery class.CacheHandler.php i class.RedisConnection.php
- Naprawione rozbieżności kluczy cache (random_products, category_name)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-16 21:25:50 +01:00
parent 53d945843a
commit 8e97413361
54 changed files with 594 additions and 346 deletions

View File

@@ -256,19 +256,17 @@ class DictionariesRepository
private function cacheFetch(string $key)
{
if (!class_exists('\Cache') || !method_exists('\Cache', 'fetch')) {
return false;
$cacheHandler = new \Shared\Cache\CacheHandler();
$cached = $cacheHandler->get(self::CACHE_SUBDIR . ':' . $key);
if ($cached) {
return unserialize($cached);
}
return \Cache::fetch($key, self::CACHE_SUBDIR);
return false;
}
private function cacheStore(string $key, string $value): void
{
if (!class_exists('\Cache') || !method_exists('\Cache', 'store')) {
return;
}
\Cache::store($key, $value, self::CACHE_TTL, self::CACHE_SUBDIR);
$cacheHandler = new \Shared\Cache\CacheHandler();
$cacheHandler->set(self::CACHE_SUBDIR . ':' . $key, $value, self::CACHE_TTL);
}
}