1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
memcache.php
См. документацию.
1<?php
2
3use Bitrix\Cluster\ClusterCacheConfig;
4
6
8{
9 public static null|bool $systemConfigurationUpdate = null;
10 protected static string $type = 'memcache';
11
12 public static function SaveConfig($servers): void
13 {
14 self::$systemConfigurationUpdate = ClusterCacheConfig::getInstance('memcache')->saveConfig(
15 $servers,
16 [
17 'type' => [
18 'class_name' => 'CPHPCacheMemcacheCluster',
19 'extension' => 'memcache',
20 'required_file' => 'modules/cluster/classes/general/memcache_cache.php',
21 ],
22 ],
23 'CPHPCacheMemcacheCluster'
24 );
25 }
26
27 public static function getStatus(array $server): array
28 {
29 $status = [];
30 if (is_array($server))
31 {
32 $ob = new Memcache;
33 if (@$ob->connect($server['HOST'], $server['PORT']))
34 {
35 $status = [
36 'uptime' => null,
37 'version' => null,
38 'cmd_get' => null,
39 'cmd_set' => null,
40 'get_misses' => null,
41 'get_hits' => null,
42 'evictions' => null,
43 'limit_maxbytes' => null,
44 'bytes' => null,
45 'curr_items' => null,
46 'listen_disabled_num' => null,
47 ];
48
49 $ar = $ob->getStats();
50 foreach ($status as $key => $_)
51 {
52 $status[$key] = $ar[$key];
53 }
54 }
55 }
56
57 return $status;
58 }
59}
Определения memcache.php:8
static null bool $systemConfigurationUpdate
Определения memcache.php:9
static getStatus(array $server)
Определения memcache.php:27
static SaveConfig($servers)
Определения memcache.php:12
static string $type
Определения memcache.php:10
</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
IncludeModuleLangFile($filepath, $lang=false, $bReturnArray=false)
Определения tools.php:3778
$ar
Определения options.php:199
if(empty($signedUserToken)) $key
Определения quickway.php:257