• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/data/statichtmlcache.php
  • Класс: BitrixMainDataStaticHtmlCache
  • Вызов: StaticHtmlCache::getStaticHtmlStorage
static function getStaticHtmlStorage($cacheKey)
{
	$configuration = array();
	$htmlCacheOptions = CHTMLPagesCache::getOptions();
	$storage = isset($htmlCacheOptions["STORAGE"]) ? $htmlCacheOptions["STORAGE"] : false;

	if (in_array($storage, array("memcached", "memcached_cluster")))
	{
		if (extension_loaded("memcache"))
		{
			return new StaticHtmlMemcachedStorage($cacheKey, $configuration, $htmlCacheOptions);
		}
		else
		{
			return null;
		}
	}
	else
	{
		return new StaticHtmlFileStorage($cacheKey, $configuration, $htmlCacheOptions);
	}
}