1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
memcachedclustercache.php
См. документацию.
1<?php
2
3namespace Bitrix\Cluster;
4
5use Bitrix\Main\Loader;
6
8{
9 private bool $bQueue = false;
10 private static null|array $servers = null;
11 private static array $otherGroups = [];
12
13 public function __construct($options = [])
14 {
15 $sid = 'bxcluster';
16 require_once \Bitrix\Main\Loader::getLocal('modules/cluster/lib/clustercacheconfig.php');
17
18 if (static::$servers === null)
19 {
20 static::$servers = ClusterCacheConfig::getInstance('memcached')->getConfig(true, self::$otherGroups);
21 }
22
23 if (defined('BX_MEMCACHED_CLUSTER'))
24 {
25 $sid = BX_MEMCACHED_CLUSTER;
26 }
27
28 if (!empty(static::$servers))
29 {
30 parent::__construct([
31 'servers' => static::$servers,
32 'type' => 'memcached',
33 'sid' => $sid
34 ]);
35 }
36
37 if (defined('BX_CLUSTER_GROUP'))
38 {
39 $this->bQueue = true;
40 }
41 }
42
43 public function QueueRun($param1, $param2, $param3)
44 {
45 $this->bQueue = false;
46 $this->clean($param1, $param2, $param3);
47 }
48
49 public function clean($baseDir, $initDir = false, $filename = false)
50 {
51 if ($this->isAvailable())
52 {
53 if ($this->bQueue && Loader::includeModule('cluster'))
54 {
55 foreach (self::$otherGroups as $group_id => $_)
56 {
57 \CClusterQueue::Add($group_id, 'MemcachedClusterCache', $baseDir, $initDir, $filename);
58 }
59 }
60
61 parent::clean($baseDir, $initDir, $filename);
62 }
63 }
64}
QueueRun($param1, $param2, $param3)
Определения memcachedclustercache.php:43
clean($baseDir, $initDir=false, $filename=false)
Определения memcachedclustercache.php:49
static Add($group_id, $command, $param1, $param2, $param3)
Определения queue.php:6
$options
Определения commerceml2.php:49
$filename
Определения file_edit.php:47
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804