Class: Radiant::Cache::EntityStore

Inherits:
Rack::Cache::EntityStore::Disk
  • Object
show all
Defined in:
lib/radiant/cache.rb

Instance Method Summary collapse

Constructor Details

#initialize(root = "#{Rails.root}/tmp/cache/entity") ⇒ EntityStore

Returns a new instance of EntityStore.



32
33
34
35
# File 'lib/radiant/cache.rb', line 32

def initialize(root="#{Rails.root}/tmp/cache/entity")
  super
  Radiant::Cache.entity_stores << self
end

Instance Method Details

#clearObject



37
38
39
# File 'lib/radiant/cache.rb', line 37

def clear
  Dir[File.join(self.root, "*")].each {|file| FileUtils.rm_rf(file) }
end