src/TreasureChest/KeyMapper.php
protected function getNamespaceKey(array $namespaces, $key)
	{
		if(empty($namespaces)) { 
			return $key;
		}

		$component = '';
		$parts = array();
		foreach($namespaces as $namespace) {
			$component.= $this->delimiter.$namespace;
			$parts[] = $this->getVersionNumber(substr($component, 1));
		}
		
		// generate the full key which will be passed to the low level cache functions
		$newKey = implode($this->delimiter, $parts).$this->delimiter;
		$newKey.= substr($component, 1).$this->delimiter;
		$newKey.= $key;
		
		return $newKey;
	}
protected function getNamespaceKey(array $namespaces, $key)
	{
		if(empty($namespaces)) { 
			return $key;
		}

		$component = '';
		$parts = array();
		foreach($namespaces as $namespace) {
			$component.= $this->delimiter.$namespace;
			$parts[] = $this->getVersionNumber(substr($component, 1));
		}
		
		// generate the full key which will be passed to the low level cache functions
		$newKey = implode($this->delimiter, $parts).$this->delimiter;
		$newKey.= substr($component, 1).$this->delimiter;
		$newKey.= $key;
		
		return $newKey;
	}
protected function getNamespaceKey ( array $ namespaces , $ key ) { if ( empty ( $ namespaces ) ) { return $ key ; } $ component = '' ; $ parts = array ( ) ; foreach ( $ namespaces as $ namespace ) { $ component .= $ this -> delimiter . $ namespace ; $ parts [ ] = $ this -> getVersionNumber ( substr ( $ component , 1 ) ) ; } // generate the full key which will be passed to the low level cache functions $ newKey = implode ( $ this -> delimiter , $ parts ) . $ this -> delimiter ; $ newKey .= substr ( $ component , 1 ) . $ this -> delimiter ; $ newKey .= $ key ; return $ newKey ; }
generates the final cache identifier for the provided namespace and key

@param $namespace
@param $key
@return string The final key name which gets passed to the store
generates the final cache identifier for the provided namespace and key