public function produce()
    {
        $cacheFactory = null;
        foreach($this->cacheFactories as $factory)
        {
            if(false === $factory instanceof CacheFactoryInterface) {
                throw new \InvalidArgumentException("Array of Cache Factories must contain valid CacheFactory objects.");
            }
            
            if($this->type == $factory->getType()) {
                $cacheFactory = $factory;
                break;
            }
        }
        
        if(null === $cacheFactory)
        {
            throw ConfigException::cacheFactoryNotFound($this->type);
        }
            
        $cache = $cacheFactory->newInstance($this->app);
        
        if(false === $cache instanceof CacheInterface) {
            throw new \InvalidArgumentException("Cache factory must produce a valid CacheInterface object.");
        }
        
        return $cache;
    }