Ruby on Rails Tuesday, December 30, 2014

On 30 December 2014 at 13:33, Ankur Kumar <specialankur@gmail.com> wrote:
>
> Thanks Colin for your reply. Can you please let me know how can user_id be
> included in caching key string? I have following implementation of caching
> as of now.
>
> app/views/employee/index.html.erb
>
> <% cache "employee_list "do %>

Something like
cache "employee_list #{current_user.id}" do
so the user id is included in cache key. Similarly for expire.

Colin

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLscwWrmOiyt6qTAyPzNQKE_LM%2Bqcad5Tu7jNnHrzXswcw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment