Ruby cache

I am trying to improve the performance of a very simple web
application. The web application let’s you choose a library from a
drop down box. then it goes to the database and loads the name and
birth places of all entries in the authors table.
then it gecodes the birthplaces of all the authors, computes their
relative distance to the library and show the top 10. any ideas on how
to do caching to speed things up?

you can cache the geocode locations in the database itself and calculate
the
distances on the fly. That should speed up things considerably. As soon
as
you add/update a new/old author call geocoding function to populate lat,
long fields in the
db.