Module: FastlyRails::ActiveRecord::SurrogateKey::ClassMethods

Defined in:
lib/fastly-rails/active_record/surrogate_key.rb

Instance Method Summary collapse

Instance Method Details

#fastly_service_identifierObject


23
24
25
# File 'lib/fastly-rails/active_record/surrogate_key.rb', line 23

def fastly_service_identifier
  FastlyRails.service_id
end

#purge_allObject


11
12
13
# File 'lib/fastly-rails/active_record/surrogate_key.rb', line 11

def purge_all
  FastlyRails.purge_by_key(table_key)
end

#soft_purge_allObject


15
16
17
# File 'lib/fastly-rails/active_record/surrogate_key.rb', line 15

def soft_purge_all
  FastlyRails.purge_by_key(table_key, true)
end

#table_keyObject


19
20
21
# File 'lib/fastly-rails/active_record/surrogate_key.rb', line 19

def table_key
  table_name
end