Module: Radiant::Cache

Defined in:
lib/radiant/cache.rb

Defined Under Namespace

Classes: EntityStore, MetaStore

Class Method Summary collapse

Class Method Details

.clearObject



26
27
28
29
# File 'lib/radiant/cache.rb', line 26

def self.clear
  meta_stores.each {|ms| ms.clear }
  entity_stores.each {|es| es.clear }
end

.new(app, options = {}) ⇒ Object



15
16
17
18
19
20
21
22
23
24
# File 'lib/radiant/cache.rb', line 15

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,
      :allow_reload => false,
      :allow_revalidate => false}.merge(options))
end