refactor(Core): optimize admin panel and refactor
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user