public function getTtlByKey($confCache, $cacheKey)
	{
	    $ttl = 0;
	    $config =  $this->getServiceLocator()->get('config');
	    if (!empty($config['caches']) && !empty($config['caches'][$confCache]))
	    {
	        $conf = $config['caches'][$confCache];
	         
	        // Get default ttl from adapater config
	        if (!empty($conf['adapter']['options']['ttl']))
	            $ttl = $conf['adapter']['options']['ttl'];
	        
	        foreach ($conf['ttls'] as $nameKey => $tll)
	        {
	            preg_match("/$nameKey/", $cacheKey, $matches, PREG_OFFSET_CAPTURE, 3);
	            
	            if (count($matches) > 0)
	            {
	                $ttl = $conf['ttls'][$nameKey];
	                break;
	            }
	        }
	    }
	    
	    return $ttl;
	}
public function getTtlByKey($confCache, $cacheKey)
	{
	    $ttl = 0;
	    $config =  $this->getServiceLocator()->get('config');
	    if (!empty($config['caches']) && !empty($config['caches'][$confCache]))
	    {
	        $conf = $config['caches'][$confCache];
	         
	        // Get default ttl from adapater config
	        if (!empty($conf['adapter']['options']['ttl']))
	            $ttl = $conf['adapter']['options']['ttl'];
	        
	        foreach ($conf['ttls'] as $nameKey => $tll)
	        {
	            preg_match("/$nameKey/", $cacheKey, $matches, PREG_OFFSET_CAPTURE, 3);
	            
	            if (count($matches) > 0)
	            {
	                $ttl = $conf['ttls'][$nameKey];
	                break;
	            }
	        }
	    }
	    
	    return $ttl;
	}
public function getTtlByKey ( $ confCache , $ cacheKey ) { $ ttl = 0 ; $ config = $ this -> getServiceLocator ( ) -> get ( 'config' ) ; if ( ! empty ( $ config [ 'caches' ] ) && ! empty ( $ config [ 'caches' ] [ $ confCache ] ) ) { $ conf = $ config [ 'caches' ] [ $ confCache ] ; // Get default ttl from adapater config if ( ! empty ( $ conf [ 'adapter' ] [ 'options' ] [ 'ttl' ] ) ) $ ttl = $ conf [ 'adapter' ] [ 'options' ] [ 'ttl' ] ; foreach ( $ conf [ 'ttls' ] as $ nameKey => $ tll ) { preg_match ( "/$nameKey/" , $ cacheKey , $ matches , PREG_OFFSET_CAPTURE , 3 ) ; if ( count ( $ matches ) > 0 ) { $ ttl = $ conf [ 'ttls' ] [ $ nameKey ] ; break ; } } } return $ ttl ; }
Returns the duration of cache, default or specific is a ttl key
is found in conf for this cache key

@param string $confCache
@param string $cacheKey
@return int
Returns the duration of cache default or specific is a ttl key is found in conf for this cache key