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