Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/cluster/classes/general/ |
Upload File : |
<?php use Bitrix\Main\Loader; class CPHPCacheMemcacheCluster extends \Bitrix\Main\Data\CacheEngineMemcache { private bool $bQueue = false; private static null|array $servers = null; private static array $otherGroups = []; public function __construct($options = []) { $sid = 'bxcluster'; require_once Bitrix\Main\Loader::getLocal('modules/cluster/lib/clustercacheconfig.php'); if (static::$servers === null) { static::$servers = Bitrix\Cluster\ClusterCacheConfig::getInstance()->getConfig(true, self::$otherGroups); } if (defined('BX_MEMCACHE_CLUSTER')) { $sid = BX_MEMCACHE_CLUSTER; } if (!empty(static::$servers)) { parent::__construct([ 'servers' => static::$servers, 'type' => 'memcache', 'sid' => $sid ]); } if (defined('BX_CLUSTER_GROUP')) { $this->bQueue = true; } } public function QueueRun($param1, $param2, $param3) { $this->bQueue = false; $this->clean($param1, $param2, $param3); } public function clean($baseDir, $initDir = false, $filename = false) { if ($this->isAvailable()) { if ($this->bQueue && Loader::includeModule('cluster')) { foreach (self::$otherGroups as $group_id => $_) { CClusterQueue::Add($group_id, 'CPHPCacheMemcacheCluster', $baseDir, $initDir, $filename); } } parent::clean($baseDir, $initDir, $filename); } } }