--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I think the only way would be to cache the data locally in some way,
either save it in a file or in the database and then retrieve it in
the next action.
If you are using the data to generate the same partial display then
you may be able to use the built in caching mechanism in rails. See
the Rails Guide on caching. In fact it may be worth looking at that
anyway.
Colin
What do you mean catching? If you mean the rails caching then there
is no size limit.
> . even
> I tried with passing these values throw params[:var] argument also failing
> Too large http request error.
> I also tried with Class variables to store data like @@graph and @@friends
> but no use those variables not at all storing data. any other way please.
Yes, the ways I suggested, in a file, database, possibly using the
rails caching to help. Have you read the guide?
Colin
I stand corrected, thanks Fred. I have only used file caching. Once
again it is shown that a little knowledge is a dangerous thing.
> It might be preferable to store the objects that are slow to fetch
> rather than the view itself, for example
>
> @friends = Rails.cache.fetch("friends_for_#{session[:fbuser]
> ["credentials"]["token"]}") do
> graph = Koala::Facebook::GraphAPI.new(session[:fbuser]
> ["credentials"]["token"])
> graph.get_connections("me", "friends").to_a
> end
That looks a good way to go.
Colin