@param string $name

@return CacheAdapter
176989
private function createRegionCache($name)
    {
        $cacheAdapter = clone $this->cache;

        if (! $cacheAdapter instanceof CacheProvider) {
            return $cacheAdapter;
        }

        $namespace = $cacheAdapter->getNamespace();

        if ($namespace !== '') {
            $namespace .= ':';
        }

        $cacheAdapter->setNamespace($namespace . $name);

        return $cacheAdapter;
    }
39633
public function getCacheAdapter()
    {
        if (!$this->cacheAdapter) {
            $this->setCacheAdapter(new Cache\Adapter\FileSystem());
        }

        return $this->cacheAdapter;
    }
1263070
public function getDispatcher($name)
    {
        $name = strtolower($name);

        if (!isset($this->dispatchers[$name])) {
            $this->addDispatcher($name, new Dispatcher());
        }

        return $this->dispatchers[$name];
    }
216683
protected function load($name)
    {
        $template = $this->nameParser->parse($name);

        if (!$template instanceof TemplateReferenceInterface) {
            throw new \RuntimeException(sprintf('The template "%s" could not be parsed.', $name));
        }

        $key = $template->getLogicalName();
        if (isset($this->cache[$key])) {
            return $this->cache[$key];
        }

        $storage = $this->loader->load($template);

        if (!$storage instanceof Storage) {
            throw new \RuntimeException(sprintf('The template "%s" could not be loaded.', $name));
        }

        return $this->cache[$key] = $storage;
    }
350732
public static function adapter($name = null) {
		$config = static::_config($name);

		if ($config === null) {
			throw new ConfigException("Configuration `{$name}` has not been defined.");
		}

		if (isset($config['object'])) {
			return $config['object'];
		}
		$class = static::_class($config, static::$_adapters);
		$settings = static::$_configurations[$name];
		$settings[0]['object'] = static::_initAdapter($class, $config);
		static::$_configurations[$name] = $settings;
		return static::$_configurations[$name][0]['object'];
	}
923402
public ICache getCache(String name) {
        return cacheFactory != null ? cacheFactory.createCache(name) : null;
    }
1051048
public function findTemplate($name)
    {
        if ($this->files->exists($name)) {
            return $name;
        }

        $name = $this->normalizeName($name);

        if (isset($this->cache[$name])) {
            return $this->cache[$name];
        }

        try {
            $this->cache[$name] = $this->finder->find($name);
        } catch (InvalidArgumentException $ex) {
            throw new LoaderError($ex->getMessage());
        }

        return $this->cache[$name];
    }
71051
public function setCacheAdapter($cacheAdapter)
    {
        if (is_null($cacheAdapter) || ! $cacheAdapter instanceof CacheAdapter) {
            return false;
        }

        $this->cacheAdapter = $cacheAdapter;

        return true;
    }
147755
public static function dispatcher($name)
	{
		static $all = [];

		if(! isset($all[$name]))
		{
			// system has been installed
			// use default mode
			if(Helper::isSystemInstall())
			{
				$cache = new Cache($name, 'events');

				if( $cache->ready() )
				{
					$data = $cache->import();
				}
				else
				{
					$event = new EventFactory($name);
					if( $event->load() === false )
					{
						throw new NotFoundException("Event '{$name}' is not registered in system");
					}

					$data = $event->getContentData();
					if(! $cache->export($data))
					{
						throw new WriteException("Can't write cache data for the '{$name}' event");
					}
				}
			}
			else
			{
				$data = (new EventFactory($name))->getContentData();
			}

			$manager = new Dispatcher(
				$data["name"],
				$data["completable"],
				function (Dispatcher $manager) use ($data) {
					foreach($data["classes"] as $class_name)
					{
						/** @var \EApp\Event\Interfaces\EventPrepareInterface $class */
						$class = new $class_name($data["name"]);
						$class->prepare($manager);
					}
				});

			$all[$name] = $manager;
		}

		return $all[$name];
	}
666956
protected function findTemplate($name)
    {
        $finder = App::make('view')->getFinder();

        if (isset($this->cache[$name])) {
            return $this->cache[$name];
        }

        if (File::isFile($name)) {
            return $this->cache[$name] = $name;
        }

        $view = $name;
        if (File::extension($view) === $this->extension) {
            $view = substr($view, 0, -strlen($this->extension));
        }

        $path = $finder->find($view);
        return $this->cache[$name] = $path;
    }
1189822
public function getComponent($name)
    {
        if (!isset($this->componentCache[$name]) && ($this->componentCache[$name]
            = $this->createComponent($name)) !== null) {
            $this->componentCache[$name]->init();
        }

        return $this->componentCache[$name];
    }
730441
static public function cache($name=null)
	{
	    $id = 'cache' . ( isset($name) ? '.'.$name : '' );
	    if (!static::has($id)) {
	        static::setShared($id, function () use ($name) {
	            // common config
	            $options = Config::getCommon('cache') ?: [];
	            
	            // compoment level config
	            if ($name) {
	                if ($name == 'db') $name = 'database';
	                
	                $m_options = Config::getByType('cache', $name);
	                if (!isset($m_options['path']) && !isset($m_options['group'])) {
	                    $options['group'] = $name;
	                }
	                if ($m_options) {
	                    $options = ArrayHelper::merge($options, $m_options);
	                }
	            }
	            
	            $options['path'] = isset($options['path']) ? ltrim($options['path'], '/') : 'caches';
	            $options['path'] = Config::getStoragePath() . $options['path'];
	            return new Cache($options);
	        });
	    }
	    return static::get($id);
	}
757099
public function selectCollection($name)
    {
        if (!isset($this->collection_cache[$name])) {
            $collection = new Collection($name, $this);
            $collection_cache[$name] = $collection;
        }

        return $collection_cache[$name];
    }
373839
protected function buildIssueAdapter($name)
    {
        $issueAdapter = $this
            ->getApplication()
            ->getAdapterFactory()
            ->createIssueTracker(
                $name,
                $this->getConfig()->get(
                    ['adapters', $name],
                    \Gush\Config::CONFIG_SYSTEM
                ),
                $this->getConfig()
            );
        $issueAdapter->authenticate();

        return $issueAdapter;
    }
857785
protected function getList($name)
    {
        if (null === ($list = $this->cache->get($name)) || !\is_array($list)) {
            return [];
        }

        return $list;
    }
972709
public function get($name) {
        N('cache_read',1);
        $name   =   $this->options['prefix'].$name;
        return wincache_ucache_exists($name)? wincache_ucache_get($name) : false;
    }
202678
public static function cache( $name )
	{
		static $cache = [];

		$name = (string) $name;

		if( ! isset($cache[$name]) )
		{
			$cache[$name] = new self($name);
		}

		return $cache[$name];
	}