Class: ActiveSupport::Cache::DatabaseStore::Model
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- ActiveSupport::Cache::DatabaseStore::Model
- Defined in:
- lib/active_support/cache/database_store/model.rb
Class Method Summary collapse
Class Method Details
.namespaced(namespace) ⇒ Object
16 17 18 19 20 |
# File 'lib/active_support/cache/database_store/model.rb', line 16 def self.namespaced(namespace) prefix = "#{namespace}:" clause = ::Arel::Nodes::NamedFunction.new('SUBSTR', [arel_table[:key], 1, prefix.bytesize]) where clause.eq(prefix) end |
.truncate! ⇒ Object
9 10 11 |
# File 'lib/active_support/cache/database_store/model.rb', line 9 def self.truncate! connection.truncate(table_name) end |