def redis=(server)
      if @no_redis then return nil end
      return if server == "" or server.nil?

      @redis = case server
                 when String
                   if server['redis://']
                     redis = Redis.connect(:url => server, :thread_safe => true)
                   else
                     server, namespace = server.split('/', 2)
                     host, port, db = server.split(':')

                     redis = Redis.new(
                         :host => host,
                         :port => port,
                         :db => db,
                         :thread_safe => true
                     )
                   end
                   Redis::Namespace.new(namespace || :glass, :redis => redis)
                 when Redis::Namespace, Redis::Distributed
                   server
                 when Redis
                   Redis::Namespace.new(:glass, :redis => server)
               end
    end
def redis=(server)
      if @no_redis then return nil end
      return if server == "" or server.nil?

      @redis = case server
                 when String
                   if server['redis://']
                     redis = Redis.connect(:url => server, :thread_safe => true)
                   else
                     server, namespace = server.split('/', 2)
                     host, port, db = server.split(':')

                     redis = Redis.new(
                         :host => host,
                         :port => port,
                         :db => db,
                         :thread_safe => true
                     )
                   end
                   Redis::Namespace.new(namespace || :glass, :redis => redis)
                 when Redis::Namespace, Redis::Distributed
                   server
                 when Redis
                   Redis::Namespace.new(:glass, :redis => server)
               end
    end
Accepts:
   1. A 'hostname:port' String
   2. A 'hostname:port:db' String (to select the Redis db)
   3. A 'hostname:port/namespace' String (to set the Redis namespace)
   4. A Redis URL String 'redis://host:port'
   5. An instance of `Redis`, `Redis::Client`, `Redis::DistRedis`,
      or `Redis::Namespace`.