Class: Cachai::Post

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/models.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.find_or_create_by_path(path) ⇒ Object



61
62
63
# File 'lib/models.rb', line 61

def self.find_or_create_by_path(path)
  find_by_path(path) || create({:path => path})
end

Instance Method Details

#clear_cacheObject



65
66
67
# File 'lib/models.rb', line 65

def clear_cache
  Cachai.clear_cache(path)
end