I loved rack-cache from the very first time that I used it, but now I
have a more complex requirement...
My app has a cookie with two important values: lang and country_code.
This values are similar to many people, but I need to cache
separately, because if I don't do it all the visitors see the site in
the same language and localization with the cache enable...
I was looking for the cache_key option and I was thinking to add
something like this:
set :cache_key do |request|
request.fullpath.replace(/\//, '-') + "-
lang:#{request.cookies['lang']}" +
"cc:#{request.cookies['country_code']}"
end
But I don't have a clue where I have to put that =(
Can anybody please help me telling me where...
Cheers,
José Antonio