public function setCacheProvider($provider = null, $config = array()) {
    if ($provider) {
      switch ($provider) {
        case 'inmemory':
          $this->cache = new ArrayCache();
          break;
        case 'redis':
          if (!isset($config['host'])) {
            throw new GiantBombException('host config not specified');
          }
          if (!isset($config['port'])) {
            throw new GiantBombException('port config not specified');
          }
          $redis = new Redis();
          $redis->connect($config['host'], $config['port']);

          $this->cache = new RedisCache();
          $this->cache->setRedis($redis);
          break;
        default:
          throw new GiantBombException('Unsupported cache type: ' . $provider);
      };
    }
  }