Class: VarnishRails::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/varnish_rails.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/varnish_rails.rb', line 31

def initialize
  @enable             = false
  @url                = 'http://localhost:6081'
  @maxage_key         = 's-maxage'
  @maxage_value       = 3600
  @xkey_length        = 12
  @header_xkey_purge  = 'xkey-purge'
  @header_x_ban_url   = 'x-ban-url'
  @print_requests     = false
  @included_models    = nil
  @excluded_models    = nil
end

Instance Attribute Details

#enableObject

Returns the value of attribute enable.



29
30
31
# File 'lib/varnish_rails.rb', line 29

def enable
  @enable
end

#excluded_modelsObject

Returns the value of attribute excluded_models.



29
30
31
# File 'lib/varnish_rails.rb', line 29

def excluded_models
  @excluded_models
end

#header_x_ban_urlObject

Returns the value of attribute header_x_ban_url.



29
30
31
# File 'lib/varnish_rails.rb', line 29

def header_x_ban_url
  @header_x_ban_url
end

#header_xkey_purgeObject

Returns the value of attribute header_xkey_purge.



29
30
31
# File 'lib/varnish_rails.rb', line 29

def header_xkey_purge
  @header_xkey_purge
end

#included_modelsObject

Returns the value of attribute included_models.



29
30
31
# File 'lib/varnish_rails.rb', line 29

def included_models
  @included_models
end

#maxage_keyObject

Returns the value of attribute maxage_key.



29
30
31
# File 'lib/varnish_rails.rb', line 29

def maxage_key
  @maxage_key
end

#maxage_valueObject

Returns the value of attribute maxage_value.



29
30
31
# File 'lib/varnish_rails.rb', line 29

def maxage_value
  @maxage_value
end

Returns the value of attribute print_requests.



29
30
31
# File 'lib/varnish_rails.rb', line 29

def print_requests
  @print_requests
end

#urlObject

Returns the value of attribute url.



29
30
31
# File 'lib/varnish_rails.rb', line 29

def url
  @url
end

#xkey_lengthObject

Returns the value of attribute xkey_length.



29
30
31
# File 'lib/varnish_rails.rb', line 29

def xkey_length
  @xkey_length
end