refactor(Core): optimize admin panel and refactor

This commit is contained in:
2026-05-07 00:15:32 +03:30
parent dec4e67b9e
commit 7cc14b7439
25 changed files with 1162 additions and 282 deletions

View File

@@ -106,6 +106,12 @@ class BannerService {
}
private function getCacheKey($position, array $context) {
return 'sodino_active_banners_' . md5($position . '|' . serialize($context));
$version = wp_cache_get('version', 'sodino_banners');
if ($version === false) {
$version = get_option('sodino_banners_cache_version', 1);
wp_cache_set('version', $version, 'sodino_banners');
}
return 'sodino_active_banners_' . md5($version . '|' . $position . '|' . serialize($context));
}
}