lib/redis-model-extension/get_find.rb
def get(args = {})
      # when argument is integer - search by id
      args = { id: args } if args.is_a?(Integer)

      #normalize input hash of arguments
      args = HashWithIndifferentAccess.new(args)

      klass = self.name.constantize
      if klass.valid_key?(args) && klass.exists?(args)
        klass.new_by_key(klass.generate_key(args))
      else
        nil
      end
    end
def get(args = {})
      # when argument is integer - search by id
      args = { id: args } if args.is_a?(Integer)

      #normalize input hash of arguments
      args = HashWithIndifferentAccess.new(args)

      klass = self.name.constantize
      if klass.valid_key?(args) && klass.exists?(args)
        klass.new_by_key(klass.generate_key(args))
      else
        nil
      end
    end
GET BY ARGUMENTS

fastest method to get object from redis by getting it by arguments
 * args (Integer) - search by id
 * args (Hash) - search by arguments in redis_key