Module: Sequel::Unicache::Expire::InstanceMethods

Included in:
Model
Defined in:
lib/sequel/unicache/expire.rb

Overview

Provide instance methods for Sequel::Model, to expire cache

Instance Method Summary collapse

Instance Method Details

#expire_unicacheObject



13
14
15
# File 'lib/sequel/unicache/expire.rb', line 13

def expire_unicache
  Write.expire self, force: true
end

#refreshObject



7
8
9
10
11
# File 'lib/sequel/unicache/expire.rb', line 7

def refresh
  model = super
  Write.expire model if Unicache.enabled?
  model
end