6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/vhost/radiant_cache_extensions.rb', line 6
def self.included(base)
base.class_eval {
def self.new(app, options={})
self.use_x_sendfile = options.delete(:use_x_sendfile) if options[:use_x_sendfile]
self.use_x_accel_redirect = options.delete(:use_x_accel_redirect) if options[:use_x_accel_redirect]
Rack::Cache.new(app, {
:entitystore => "radiant:tmp/cache/entity",
:metastore => "radiant:tmp/cache/meta",
:verbose => false}.merge(options))
end
def self.clear(host_and_url = nil)
meta_stores.each {|ms| ms.clear(host_and_url) }
entity_stores.each {|es| es.clear }
end
}
end
|