> <% cache_for(@record) do %> --> "user_45_cache" which would equate to
> something like dom_id where it uses the types class and the object id
> as part of the namespace.

This already works if the first argument to #cache is an Array.  
Elements are joined with #to_param. Additionally, if any element in  
the collection responds to #cache_key, it will be called. All AR  
objects respond to #cache_key:

Topic.first.cache_key #=> "topics/1-20081129070634"

So, if you do something like cache([EMAIL PROTECTED], @post]), you'll get a key 
 
like:

"topics/1-20081129070634/posts/1-20050211193200"

See ActiveSupport::Cache.expand_cache_key

/Jeff


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to