I just blogged about this (see that for longer explanation), but if you want to cache an action, based on all the query parameters (or say on nearly all of them), you can do: caches_action :my_action, :cache_path => Proc. New { |c| c. Params } Or, maybe you want all but some params that you just use for Analytics (but that have no bearing on the records you're fetching): caches_action :my_action, :cache_path => Proc.
New { |c| c.params. Delete_if { |k,v| k. Starts_with?('utm_') } }.
Say the action has username john and you've cached a few versions of this based on random get parameters passed in. Is there a way to invalidate the cache for the action with username john AND all the cached versions with params? Example /john/picture?
Dimension=50 and /john/picture? Dimension=100 is it possible to clear all the versions of johns picture? – Marc 2 days ago.
To use the request url as cache key I do something like this: caches_action :index, :cache_path => Proc. New {|c| c.request. Url }.
If you want to cache on client side, here are some useful links: igvita.com/2007/03/07/client-http-cachin... guides.rubyonrails.org/caching_with_rail... just send the proper HTTP headers and the client will cache the response.
I'm looking for the server side caching like page/action/fragment caching. – xpepermint Jan 1 '10 at 14:51.
In this case you should use fragments caching: in your controller: cache(params:max_price, :expires_in => 10. Minute) do # get the result end.
Caches_action :my_action, :cache_path => Proc. New { |c| c. Caches_action :my_action, :cache_path => Proc.
New { |c| c.params. Delete_if { |k,v| k.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.