Best positioning of GEO IP identifier Apache or Ruby Code

Hi,

I am trying to make by site geo-intelligent. As in when a user comes
from US the default values on my site should become US specific and when
user is from any other place, I want to default to different values. So
its kinda US or Rest of US kinda thing.

I have learn’t that we have two options - GeoIP ruby gem and Apache
Module GEOIP.
So the question is where is it best to place this check? If placed in
Apache, can we pass value to Mongrels?

If places in application controller, will the GEOIP.dat be opened to
lookup on every request? Is there a way where in it is pre-loaded on
memory and for each request I can just lookup the memory tree?

Please suggest.

Regards,
Sandeep G