1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
memcachedclusterhelper.php
См. документацию.
1<?php
2
3namespace Bitrix\Cluster;
4
6
8{
9 public static null|bool $systemConfigurationUpdate = null;
10 protected static string $type = 'memcached';
11
12 public static function saveConfig($servers): void
13 {
14 self::$systemConfigurationUpdate = ClusterCacheConfig::getInstance('memcached')->saveConfig(
15 $servers,
16 [
17 'type' => [
18 'class_name' => '\Bitrix\Cluster\MemcachedClusterCache',
19 'extension' => 'memcached',
20 'required_file' => 'modules/cluster/lib/memcachedclustercache.php',
21 ],
22 ],
23 '\Bitrix\Cluster\MemcachedClusterCache'
24 );
25 }
26
27 public static function getStatus(array $server): array
28 {
29 $status = [];
30 $memcached = new \Memcached;
31 if ($memcached->addServer($server['HOST'], $server['PORT']))
32 {
33 $status = [
34 'uptime' => null,
35 'version' => null,
36 'cmd_get' => null,
37 'cmd_set' => null,
38 'get_misses' => null,
39 'get_hits' => null,
40 'evictions' => null,
41 'limit_maxbytes' => null,
42 'bytes' => null,
43 'curr_items' => null,
44 'listen_disabled_num' => null,
45 ];
46
47 $info = $memcached->getStats();
48 if (is_array($info) && ($serverStatus = array_shift($info)))
49 {
50 foreach ($status as $key => $_)
51 {
52 $status[$key] = $serverStatus[$key];
53 }
54 }
55 }
56
57 return $status;
58 }
59}
static null bool $systemConfigurationUpdate
Определения memcachedclusterhelper.php:9
static getStatus(array $server)
Определения memcachedclusterhelper.php:27
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$status
Определения session.php:10
if($NS['step']==6) if( $NS[ 'step']==7) if(COption::GetOptionInt('main', 'disk_space', 0) > 0) $info
Определения backup.php:924
IncludeModuleLangFile($filepath, $lang=false, $bReturnArray=false)
Определения tools.php:3778
if(empty($signedUserToken)) $key
Определения quickway.php:257