Method: Apache::Performance#activate_keepalive

Defined in:
lib/apache/performance.rb

#activate_keepalive(options) ⇒ Object

Activate KeepAlive, optionally tweaking max requests and timeout

activate_keepalive :requests => 100, :timeout => 5 #=>
  KeepAlive on
  MaxKeepAliveRequests 100
  KeepAliveTimeout 5


10
11
12
13
14
15
16
17
18
19
20
# File 'lib/apache/performance.rb', line 10

def activate_keepalive(options)
  self << "KeepAlive On"
  options.each do |option, value|
    case option
      when :requests
        self << "MaxKeepAliveRequests #{value}"
      when :timeout
        self << "KeepAliveTimeout #{value}"
    end
  end
end