You may want it to accept *args and join them all, possibly by implicitly
calling .to_param on them. i.e.
cache(@forum, @topic, @post) do
to uniquely cache a particular set of associated objects
On Thu, Dec 4, 2008 at 1:23 PM, Alex MacCaw <[EMAIL PROTECTED]> wrote:
>
> Just wanted to run this by a few people to get some feedback.
>
> At the moment, fragment cache (as indeed Rails.cache) calls often look
> a bit like this:
> <% cache("[EMAIL PROTECTED]") do %>
>
> I was thinking cache should take multiple arguments, which would be
> joined with an underscore, like this:
> <% cache(:namespace, @record.id) do %>
>
> Looks a bit nicer. This wouldn't stop old cache calls (with a string)
> from working.
>
> What do you think?
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---