You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: cache_key.rb
    path of file: ./repos/blacklight/app/models/concerns/blacklight/document
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

# This module provides the cache key which can be u
    
  def cache_key
    if new_record?
      "#{self.class.model_name.cache_key}/new"
    elsif key? cache_version_key
      cache_version_value = self[cache_version_key]
      "#{self.class.model_name.cache_key}/#{id}-#{Array(cache_version_value).join}"
    else
      "#{self.class.model_name.cache_key}/#{id}"
    end