处理 CachePut 注解
@PointCut(
type=PointCutType::ANNOTATION,
allow={
\Imi\Cache\Annotation\CachePut::class,
}
)
@Around
@return mixed
427838
public function parseCachePut(AroundJoinPoint $joinPoint)
    {
        $methodReturn = $joinPoint->proceed();

        $class = get_parent_class($joinPoint->getTarget());

        // CachePut 注解列表
        $cachePuts = AnnotationManager::getMethodAnnotations($class, $joinPoint->getMethod(), CachePut::class);

        // 方法参数
        $args = ClassObject::convertArgsToKV($class, $joinPoint->getMethod(), $joinPoint->getArgs());

        foreach($cachePuts as $cachePut)
        {
            // 缓存名
            $name = $cachePut->name;
            if(null === $name)
            {
                $name = Config::get('@currentServer.cache.default');
                if(null === $name)
                {
                    throw new \RuntimeException('config "cache.default" not found');
                }
            }

            // 键
            $key = $this->getKey($joinPoint, $args, $cachePut);
            $cacheInstance = CacheManager::getInstance($name);

            $cacheInstance->set($key, $this->getValue($cachePut, $methodReturn), $cachePut->ttl);
        }

        return $methodReturn;
    }
111405
public function getCachedResult()
    {
        if ($this->result === null) {
            return null;
        }

        // Make sure the criteria hasn't changed
        if ($this->resultCriteria !== $this->getCriteria()) {
            $this->result = null;

            return null;
        }

        return $this->result;
    }
69310
protected function getCommandInput()
    {
        $modelName = trim($this->argument('model-name'));
        $table = trim($this->option('table-name')) ?: Helpers::makeTableName($modelName);
        $primaryKey = trim($this->option('primary-key'));
        $useSoftDelete = $this->option('with-soft-delete');
        $useTimeStamps = !$this->option('without-timestamps');

        $modelDirectory = trim($this->option('model-directory'));
        $resourceFile = trim($this->option('resource-file')) ?: Helpers::makeJsonFileName($modelName);
        $languageFileName = $this->option('language-filename') ?: Helpers::makeLocaleGroup($modelName);
        $template = $this->getTemplateName();

        return (object) compact(
            'table',
            'primaryKey',
            'useSoftDelete',
            'useTimeStamps',
            'resourceFile',
            'template',
            'modelName',
            'modelDirectory',
            'languageFileName'
        );
    }
912477
public function get_cache()
    {
        $args = func_get_args();
        $cache_path = call_user_func_array(array($this, 'get_path'), $args);

        if (is_file($cache_path)) {
            return file_get_contents($cache_path);
        }
        return null;
    }
1318721
public function getInput() {
		if (!isset($this->input)) {
			switch ($this->method) {
			case 'POST':
				switch ($this->getContentType()) {
				case 'application/x-www-form-urlencoded':
				case 'multipart/form-data':
					$this->input = $_POST;
					break;

				default:
					$this->input = $this->getParamsFromInput();
					break;
				}
				break;

			case 'PUT':
			case 'DELETE':
				$this->input = $this->getParamsFromInput();
				break;

			default:
				$this->input = [];
				break;
			}
		}

		return $this->input;
	}
508805
private function getEndpointsCache() 
    {
        if ($this->_cache === null) {
            if (!isset($this->_values[self::OPTION_MEMCACHED_SERVERS])) {
                return null;
            }
            if (!class_exists('Memcached', false)) {
                return null;
            }

            $servers = $this->_values[self::OPTION_MEMCACHED_SERVERS];
            if (!is_array($servers)) {
                throw new ClientException('Invalid memcached servers list. should be an array of servers');
            }

            $cache = new \Memcached(self::OPTION_MEMCACHED_PERSISTENT_ID);
            if (empty($cache->getServerList())) {
                $cache->addServers($servers);
            }
            
            if (isset($this->_values[self::OPTION_MEMCACHED_OPTIONS])) {
                $options = $this->_values[self::OPTION_MEMCACHED_OPTIONS];
                if (!is_array($options)) {
                    throw new ClientException('Invalid memcached options list. should be an array of options');
                }
                $cache->setOptions($options);
            }

            $this->_cache = $cache;
        
        }
        return $this->_cache;
    }
1344399
public function cache()
    {
        $paramCount = func_num_args();

        if (1 === $paramCount) {
            return $this["cache"]->get(func_get_arg(0));
        }

        if (2 === $paramCount) {
            return $this["cache"]->set(func_get_arg(0), func_get_arg(1));
        }

        if (3 === $paramCount) {
            return $this["cache"]->set(func_get_arg(0), func_get_arg(1), func_get_arg(2));
        }

        throw new InvalidArgumentException("App::cache() method expects 1 or 2(3) parameters. {$paramCount} given.");
    }
1091557
private function cachedI() {
		if (!isset($this->{__METHOD__})) {
			$this->{__METHOD__} = $this->cached();
		}
		return $this->{__METHOD__};
	}
697022
public function getRuntimeEvaluationsDefinition(): array
    {
        if ($this->pointcut === null) {
            $this->pointcut = $this->proxyClassBuilder->findPointcut($this->aspectClassName, $this->pointcutMethodName);
        }
        if ($this->pointcut === false) {
            return [];
        }

        return $this->pointcut->getRuntimeEvaluationsDefinition();
    }
22924
public function getCached()
    {
        $cached = $this->cache->get(
            $this->getCacheKey(),
            []
        );

        return $this->formatCache($cached);
    }
1225953
protected function getCommandInput()
    {
        $modelName = trim($this->argument('model-name'));
        $fileName = trim($this->option('language-filename')) ?: Helpers::makeLocaleGroup($modelName);
        $resourceFile = trim($this->option('resource-file')) ?: Helpers::makeJsonFileName($modelName);
        $template = trim($this->option('template-name'));

        return (object) compact(
            'modelName',
            'fileName',
            'resourceFile',
            'template'
        );
    }
1138921
public function getAsPair()
    {
        $result = array();

        foreach ($this->data as $key => $options) {
            $result[$key] = $options[self::CACHE_PARAM_VALUE];
        }

        return $result;
    }
1266256
public function current()
    {
        $offset = $this->hasPaginator() ? $this->getPaginator()->getOffset() : 0;
        $key = $this->keys[$this->key() + $offset];

        return $this->source[$key];
    }
16159
public function cache(){

        $args = \func_get_args();

        switch(\count($args)){
        case 1:
            return $this->helper('cache')->read($args[0]);
        case 2:
            return $this->helper('cache')->write($args[0], $args[1]);
        }

        return null;
    }
914803
public function getCache()
    {

        if ($this->type && $_SESSION['PHPIDS'][$this->type]) {
            return $_SESSION['PHPIDS'][$this->type];
        }

        return false;
    }
1309487
private function cachedObjectsI() {
		if (!isset($this->{__METHOD__})) {
			$this->{__METHOD__} = $this->cachedObjects();
		}
		return $this->{__METHOD__};
	}
493241
protected function cachePool()
    {
        if ($this->cachePool === null) {
            throw new RuntimeException(sprintf(
                'Cache Pool is not defined for "%s"',
                get_class($this)
            ));
        }

        return $this->cachePool;
    }