%PDF- %PDF- 403WebShell
403Webshell
Server IP : 37.220.80.31  /  Your IP : 18.223.106.79
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux 3051455-guretool.twc1.net 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64
User : www-root ( 1010)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/www-root/data/www/dev.artlot24.ru/bitrix/modules/main/lib/diag/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/modules/main/lib/diag/cachetracker.php
<?php
namespace Bitrix\Main\Diag;


class CacheTracker
{
	private static $cacheStatBytes = 0;
	private static $arCacheDebug = array();

	private static $skipUntil = array(
		"bitrix\\main\\diag\\cachetracker::add" => true,
		"bitrix\\main\\data\\cache->initcache" => true,
		"bitrix\\main\\data\\cache->startdatacache" => true,
		"bitrix\\main\\data\\cache->enddatacache" => true,
		"bitrix\\main\\data\\cache->clean" => true,
		"bitrix\\main\\data\\cache->cleandir" => true,
		"bitrix\\main\\data\\managedcache->read" => true,
		"bitrix\\main\\data\\managedcache->setimmediate" => true,
		"bitrix\\main\\data\\managedcache->clean" => true,
		"bitrix\\main\\data\\managedcache->cleandir" => true,
		"bitrix\\main\\data\\managedcache->cleanall" => true,
		"cbitrixcomponent->startresultcache" => true,
	);

	/**
	 * @param int $cacheStatBytes
	 */
	public static function setCacheStatBytes($cacheStatBytes)
	{
		self::$cacheStatBytes = $cacheStatBytes;
	}

	public static function addCacheStatBytes($cacheStatBytes)
	{
		self::$cacheStatBytes += $cacheStatBytes;
	}

	public static function getCacheStatBytes()
	{
		return self::$cacheStatBytes;
	}

	public static function add($size, $path, $baseDir, $initDir, $filename, $operation)
	{
		$prev = array();
		$found = -1;
		foreach (Helper::getBackTrace(8) as $tr)
		{
			$func = $tr["class"].$tr["type"].$tr["function"];

			if ($found < 0 && !isset(self::$skipUntil[mb_strtolower($func)]))
			{
				$found = count(self::$arCacheDebug);
				self::$arCacheDebug[$found] = array(
					"TRACE" => array(),
					"path" => $path,
					"basedir" => $baseDir,
					"initdir" => $initDir,
					"filename" => $filename,
					"cache_size" => $size,
					"callee_func" => $prev["class"].$prev["type"].$prev["function"],
					"operation" => $operation,
				);
				self::$arCacheDebug[$found]["TRACE"][] = array(
					"func" => $prev["class"].$prev["type"].$prev["function"],
					"args" => array(),
					"file" => $prev["file"],
					"line" => $prev["line"],
				);
			}

			if ($found > -1)
			{
				if (count(self::$arCacheDebug[$found]["TRACE"]) < 8)
				{
					$args = array();
					if (is_array($tr["args"]))
					{
						foreach ($tr["args"] as $k1 => $v1)
						{
							if (is_array($v1))
							{
								foreach ($v1 as $k2 => $v2)
								{
									if (is_scalar($v2))
										$args[$k1][$k2] = $v2;
									elseif (is_object($v2))
										$args[$k1][$k2] = get_class($v2);
									else
										$args[$k1][$k2] = gettype($v2);
								}
							}
							else
							{
								if (is_scalar($v1))
									$args[$k1] = $v1;
								elseif (is_object($v1))
									$args[$k1] = get_class($v1);
								else
									$args[$k1] = gettype($v1);
							}
						}
					}

					self::$arCacheDebug[$found]["TRACE"][] = array(
						"func" => $func,
						"args" => $args,
						"file" => $tr["file"],
						"line" => $tr["line"],
					);
				}
				else
				{
					break;
				}
			}
			$prev = $tr;
		}
	}

	public static function getCacheTracking()
	{
		return static::$arCacheDebug;
	}

	public static function setCacheTracking($val)
	{
		static::$arCacheDebug = $val;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit