title: Rails Cache Key generated as ActiveRecord::Relation
body: <p>I am attempting to generate a fragment cache (using a Dalli/Memcached store) however the key is being generated with "#" as part of the key, so Rails doesn't seem to be recognizing that there is a cache value and is hitting the database.</p>
  
  <p>My cache key in the view looks like this:</p>
  
  <pre><code>cache([@jobs, "index"]) do
  </code></pre>
  
  <p>The controller has:</p>
  
  <pre><code>@jobs = @current_tenant.active_jobs
  </code></pre>
  
  <p>With the actual Active Record query like this:</p>
  
  <pre><code>def active_jobs
     self.jobs.where("published = ? and expiration_date &gt;= ?", true, Date.today).order("(featured and created_at &gt; now() - interval '" + self.pinned_time_limit.to_s + " days') desc nulls last, created_at desc")
  end
  </code></pre>
  
  <p>Looking at the rails server, I see the cache read, but the SQL Query still runs:</p>
  
  <pre><code>Cache read: views/#&lt;ActiveRecord::Relation:0x007fbabef9cd58&gt;/1-index 
  Read fragment views/#&lt;ActiveRecord::Relation:0x007fbabef9cd58&gt;/1-index (1.0ms)
  (0.6ms) SELECT COUNT(*) FROM "jobs" WHERE "jobs"."tenant_id" = 1 AND (published = 't' and expiration_date &gt;= '2013-03-03')
    Job Load (1.2ms)  SELECT "jobs".* FROM "jobs" WHERE "jobs"."tenant_id" = 1 AND (published = 't' and expiration_date &gt;= '2013-03-03') ORDER BY (featured and created_at &gt; now() - interval '7 days') desc nulls last, created_at desc
  </code></pre>
  
  <p>Any ideas as to what I might be doing wrong?  I'm sure it has to do w/ the key generation and ActiveRecord::Relation, but i'm not sure how. </p>