Module: Catche::Model

Extended by:
ActiveSupport::Concern
Defined in:
lib/catche/model.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#catche_tagObject



58
59
60
# File 'lib/catche/model.rb', line 58

def catche_tag
  Tag.join self.class.catche_tag, self.send(:id)
end

#expire_collection!Object



67
68
69
# File 'lib/catche/model.rb', line 67

def expire_collection!
  Catche::Tag.expire! *Catche::Tag::Collect.collection(self)[:expire]
end

#expire_resource!Object



71
72
73
# File 'lib/catche/model.rb', line 71

def expire_resource!
  Catche::Tag.expire! *Catche::Tag::Collect.resource(self)[:expire]
end

#expire_resource_and_collection!Object



62
63
64
65
# File 'lib/catche/model.rb', line 62

def expire_resource_and_collection!
  expire_collection!
  expire_resource!
end