Flowdock
method

compute_cache_key

Importance_0
v6.0.0 - Show latest stable - 0 notes - Class: ActiveRecord::Relation
compute_cache_key(timestamp_column = :updated_at) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/relation.rb, line 316
    def compute_cache_key(timestamp_column = :updated_at) # :nodoc:
      query_signature = ActiveSupport::Digest.hexdigest(to_sql)
      key = "#{klass.model_name.cache_key}/query-#{query_signature}"

      if cache_version(timestamp_column)
        key
      else
        "#{key}-#{compute_cache_version(timestamp_column)}"
      end
    end
Register or log in to add new notes.