use wcf\system\cache\source\DiskCacheSource;
use wcf\system\exception\SystemException;
use wcf\system\SingletonFactory;
-use wcf\util\StringUtil;
/**
* Manages transparent cache access.
*/
protected function getCacheName(ICacheBuilder $cacheBuilder, array $parameters = [])
{
- $className = \explode('\\', \get_class($cacheBuilder));
- $application = \array_shift($className);
- $cacheName = \str_replace('CacheBuilder', '', \array_pop($className));
+ $cacheName = \str_replace(
+ ['\\', 'system_cache_builder_'],
+ ['_', ''],
+ \get_class($cacheBuilder)
+ );
if (!empty($parameters)) {
$cacheName .= '-' . $this->getCacheIndex($parameters);
}
- return $application . '_' . StringUtil::firstCharToUpperCase($cacheName);
+ return $cacheName;
}
/**