public function setCache($cache)
    {
        if (is_string($cache) && class_exists($cache)) {
            $cache = new $cache();
        }
        
        if (is_array($cache)) {
            $cache = StorageFactory::factory($cache);
        }
        
        if (!$cache instanceof AbstractCacheAdapter) {
            throw new \Exception('Invalid Cache');
        }
        
        $this->cache = $cache;
    }