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/cvetdv.ru/bitrix/modules/cluster/lib/ |
Upload File : |
<?php namespace Bitrix\Cluster; use Bitrix\Main\Loader; class MemcachedClusterCache extends \Bitrix\Main\Data\CacheEngineMemcached { 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 = ClusterCacheConfig::getInstance('memcached')->getConfig(true, self::$otherGroups); } if (defined('BX_MEMCACHED_CLUSTER')) { $sid = BX_MEMCACHED_CLUSTER; } if (!empty(static::$servers)) { parent::__construct([ 'servers' => static::$servers, 'type' => 'memcached', '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, 'MemcachedClusterCache', $baseDir, $initDir, $filename); } } parent::clean($baseDir, $initDir, $filename); } } }