src/Mvc/Controller/Controller.php
private function _getCacheInfo()
	{
		$request     = Agl::getRequest();
		$module      = $request->getModule();
		$view        = $request->getView();
		$action      = $request->getAction();
		$cacheInfo   = array();
		$cacheConfig = Agl::app()->getConfig('core-layout/modules/' . $module . '#' . $view . '#action#' . $action . '/' . ConfigInterface::CONFIG_CACHE_NAME);

		if ($cacheConfig === NULL) {
			$cacheConfig = Agl::app()->getConfig('core-layout/modules/' . $module . '#' . $view . '/' . ConfigInterface::CONFIG_CACHE_NAME);
		}

		if ($cacheConfig === NULL) {
			$cacheConfig = Agl::app()->getConfig('core-layout/modules/' . $module . '/' . ConfigInterface::CONFIG_CACHE_NAME);
		}

		if ($cacheConfig === NULL) {
			$cacheConfig = Agl::app()->getConfig('core-layout/modules/' . ConfigInterface::CONFIG_CACHE_NAME);
		}

		if (is_array($cacheConfig)) {
			$configCacheTtlName  = ConfigInterface::CONFIG_CACHE_TTL_NAME;
			$configCacheTypeName = ConfigInterface::CONFIG_CACHE_TYPE_NAME;

			$cacheInfo[$configCacheTtlName] = (isset($cacheConfig[$configCacheTtlName]) and ctype_digit($cacheConfig[$configCacheTtlName])) ? (int)$cacheConfig[$configCacheTtlName] : 0;

			$type = (isset($cacheConfig[$configCacheTypeName])) ? $cacheConfig[$configCacheTypeName] : ConfigInterface::CONFIG_CACHE_TYPE_STATIC;

			$cacheInfo[CacheInterface::CACHE_KEY] = ViewInterface::CACHE_FILE_PREFIX
			                                        . $module
			                                        . CacheInterface::CACHE_KEY_SEPARATOR
			                                        . $view
			                                        . CacheInterface::CACHE_KEY_SEPARATOR
			                                        . $action;

			if (Agl::isModuleLoaded(Agl::AGL_MORE_POOL . '/locale/locale')) {
	            $cacheInfo[CacheInterface::CACHE_KEY] .= CacheInterface::CACHE_KEY_SEPARATOR
	                                                     . Agl::getSingleton(Agl::AGL_MORE_POOL . '/locale')->getLanguage();
	        }

			if ($type == ConfigInterface::CONFIG_CACHE_TYPE_DYNAMIC) {
				$cacheInfo[CacheInterface::CACHE_KEY] .= CacheInterface::CACHE_KEY_SEPARATOR
				                                         . StringData::rewrite($request->getReq());
				if (Request::isAjax()) {
					$cacheInfo[CacheInterface::CACHE_KEY] .= CacheInterface::CACHE_KEY_SEPARATOR
					                                         . ConfigInterface::CONFIG_CACHE_KEY_AJAX;
				}
			}
		}

		return $cacheInfo;
	}
private function _getCacheInfo()
	{
		$request     = Agl::getRequest();
		$module      = $request->getModule();
		$view        = $request->getView();
		$action      = $request->getAction();
		$cacheInfo   = array();
		$cacheConfig = Agl::app()->getConfig('core-layout/modules/' . $module . '#' . $view . '#action#' . $action . '/' . ConfigInterface::CONFIG_CACHE_NAME);

		if ($cacheConfig === NULL) {
			$cacheConfig = Agl::app()->getConfig('core-layout/modules/' . $module . '#' . $view . '/' . ConfigInterface::CONFIG_CACHE_NAME);
		}

		if ($cacheConfig === NULL) {
			$cacheConfig = Agl::app()->getConfig('core-layout/modules/' . $module . '/' . ConfigInterface::CONFIG_CACHE_NAME);
		}

		if ($cacheConfig === NULL) {
			$cacheConfig = Agl::app()->getConfig('core-layout/modules/' . ConfigInterface::CONFIG_CACHE_NAME);
		}

		if (is_array($cacheConfig)) {
			$configCacheTtlName  = ConfigInterface::CONFIG_CACHE_TTL_NAME;
			$configCacheTypeName = ConfigInterface::CONFIG_CACHE_TYPE_NAME;

			$cacheInfo[$configCacheTtlName] = (isset($cacheConfig[$configCacheTtlName]) and ctype_digit($cacheConfig[$configCacheTtlName])) ? (int)$cacheConfig[$configCacheTtlName] : 0;

			$type = (isset($cacheConfig[$configCacheTypeName])) ? $cacheConfig[$configCacheTypeName] : ConfigInterface::CONFIG_CACHE_TYPE_STATIC;

			$cacheInfo[CacheInterface::CACHE_KEY] = ViewInterface::CACHE_FILE_PREFIX
			                                        . $module
			                                        . CacheInterface::CACHE_KEY_SEPARATOR
			                                        . $view
			                                        . CacheInterface::CACHE_KEY_SEPARATOR
			                                        . $action;

			if (Agl::isModuleLoaded(Agl::AGL_MORE_POOL . '/locale/locale')) {
	            $cacheInfo[CacheInterface::CACHE_KEY] .= CacheInterface::CACHE_KEY_SEPARATOR
	                                                     . Agl::getSingleton(Agl::AGL_MORE_POOL . '/locale')->getLanguage();
	        }

			if ($type == ConfigInterface::CONFIG_CACHE_TYPE_DYNAMIC) {
				$cacheInfo[CacheInterface::CACHE_KEY] .= CacheInterface::CACHE_KEY_SEPARATOR
				                                         . StringData::rewrite($request->getReq());
				if (Request::isAjax()) {
					$cacheInfo[CacheInterface::CACHE_KEY] .= CacheInterface::CACHE_KEY_SEPARATOR
					                                         . ConfigInterface::CONFIG_CACHE_KEY_AJAX;
				}
			}
		}

		return $cacheInfo;
	}
private function _getCacheInfo ( ) { $ request = Agl :: getRequest ( ) ; $ module = $ request -> getModule ( ) ; $ view = $ request -> getView ( ) ; $ action = $ request -> getAction ( ) ; $ cacheInfo = array ( ) ; $ cacheConfig = Agl :: app ( ) -> getConfig ( 'core-layout/modules/' . $ module . '#' . $ view . '#action#' . $ action . '/' . ConfigInterface :: CONFIG_CACHE_NAME ) ; if ( $ cacheConfig === NULL ) { $ cacheConfig = Agl :: app ( ) -> getConfig ( 'core-layout/modules/' . $ module . '#' . $ view . '/' . ConfigInterface :: CONFIG_CACHE_NAME ) ; } if ( $ cacheConfig === NULL ) { $ cacheConfig = Agl :: app ( ) -> getConfig ( 'core-layout/modules/' . $ module . '/' . ConfigInterface :: CONFIG_CACHE_NAME ) ; } if ( $ cacheConfig === NULL ) { $ cacheConfig = Agl :: app ( ) -> getConfig ( 'core-layout/modules/' . ConfigInterface :: CONFIG_CACHE_NAME ) ; } if ( is_array ( $ cacheConfig ) ) { $ configCacheTtlName = ConfigInterface :: CONFIG_CACHE_TTL_NAME ; $ configCacheTypeName = ConfigInterface :: CONFIG_CACHE_TYPE_NAME ; $ cacheInfo [ $ configCacheTtlName ] = ( isset ( $ cacheConfig [ $ configCacheTtlName ] ) and ctype_digit ( $ cacheConfig [ $ configCacheTtlName ] ) ) ? ( int ) $ cacheConfig [ $ configCacheTtlName ] : 0 ; $ type = ( isset ( $ cacheConfig [ $ configCacheTypeName ] ) ) ? $ cacheConfig [ $ configCacheTypeName ] : ConfigInterface :: CONFIG_CACHE_TYPE_STATIC ; $ cacheInfo [ CacheInterface :: CACHE_KEY ] = ViewInterface :: CACHE_FILE_PREFIX . $ module . CacheInterface :: CACHE_KEY_SEPARATOR . $ view . CacheInterface :: CACHE_KEY_SEPARATOR . $ action ; if ( Agl :: isModuleLoaded ( Agl :: AGL_MORE_POOL . '/locale/locale' ) ) { $ cacheInfo [ CacheInterface :: CACHE_KEY ] .= CacheInterface :: CACHE_KEY_SEPARATOR . Agl :: getSingleton ( Agl :: AGL_MORE_POOL . '/locale' ) -> getLanguage ( ) ; } if ( $ type == ConfigInterface :: CONFIG_CACHE_TYPE_DYNAMIC ) { $ cacheInfo [ CacheInterface :: CACHE_KEY ] .= CacheInterface :: CACHE_KEY_SEPARATOR . StringData :: rewrite ( $ request -> getReq ( ) ) ; if ( Request :: isAjax ( ) ) { $ cacheInfo [ CacheInterface :: CACHE_KEY ] .= CacheInterface :: CACHE_KEY_SEPARATOR . ConfigInterface :: CONFIG_CACHE_KEY_AJAX ; } } } return $ cacheInfo ; }
Return a TTL and a cache key composed of the module, the view, the
actions and of the locale code and the request string if required.

@return array
Return a TTL and a cache key composed of the module the view the actions and of the locale code and the request string if required .